linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.12-rc4 13/15] include: update device attribute callbacks
@ 2005-05-17 10:44 Yani Ioannou
  2005-05-17 11:19 ` 2.6 kernel network programming linux
  0 siblings, 1 reply; 3+ messages in thread
From: Yani Ioannou @ 2005-05-17 10:44 UTC (permalink / raw)
  To: Greg KH, linux-kernel, lm-sensors

[-- Attachment #1: Type: text/plain, Size: 61 bytes --]

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>

---

[-- Attachment #2: patch-linux-2.6.12-rc4-sysfsdyncallback-deviceattr-update.diff-include.diff.diffstat.txt --]
[-- Type: text/plain, Size: 66 bytes --]

 ocp.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


[-- Attachment #3: patch-linux-2.6.12-rc4-sysfsdyncallback-deviceattr-update.diff-include.diff --]
[-- Type: text/x-patch, Size: 799 bytes --]

diff -uprN -X dontdiff linux-2.6.12-rc4-sysfsdyncallback-deviceattr/include/asm-ppc/ocp.h linux-2.6.12-rc4-sysfsdyncallback-deviceattr-update/include/asm-ppc/ocp.h
--- linux-2.6.12-rc4-sysfsdyncallback-deviceattr/include/asm-ppc/ocp.h	2005-05-16 20:36:26.000000000 -0400
+++ linux-2.6.12-rc4-sysfsdyncallback-deviceattr-update/include/asm-ppc/ocp.h	2005-05-16 23:45:53.000000000 -0400
@@ -189,7 +189,7 @@ extern void ocp_for_each_device(void(*ca
 /* Sysfs support */
 #define OCP_SYSFS_ADDTL(type, format, name, field)			\
 static ssize_t								\
-show_##name##_##field(struct device *dev, char *buf)			\
+show_##name##_##field(struct device *dev, struct device_attribute *attr, char *buf)			\
 {									\
 	struct ocp_device *odev = to_ocp_dev(dev);			\
 	type *add = odev->def->additions;				\


^ permalink raw reply	[flat|nested] 3+ messages in thread

* 2.6 kernel network programming
  2005-05-17 10:44 [PATCH 2.6.12-rc4 13/15] include: update device attribute callbacks Yani Ioannou
@ 2005-05-17 11:19 ` linux
  2005-05-17 11:44   ` Niraj kumar
  0 siblings, 1 reply; 3+ messages in thread
From: linux @ 2005-05-17 11:19 UTC (permalink / raw)
  To: linux-kernel

Hi all,
can someone tell me how i can listen and accept connections into a port from
the kernel-space???
I start listening with the following function :

        struct socket *sock;
        struct sockaddr_in sin;
        int error=0;

        error=sock_create(PF_INET,SOCK_STREAM,IPPROTO_TCP,&sock);

        sin.sin_family = AF_INET;
        sin.sin_addr.s_addr = INADDR_ANY;
        sin.sin_port = htons((unsigned short)port);

        error=sock->ops->bind(sock,(struct sockaddr*)&sin,sizeof(sin));
        sock->ops->listen(sock,48);

How about accepting connections and sending some kind of a message for
beggining?
Can someone help me please.


Thanks in advance,
chris.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6 kernel network programming
  2005-05-17 11:19 ` 2.6 kernel network programming linux
@ 2005-05-17 11:44   ` Niraj kumar
  0 siblings, 0 replies; 3+ messages in thread
From: Niraj kumar @ 2005-05-17 11:44 UTC (permalink / raw)
  To: linux; +Cc: linux-kernel

On 5/17/05, linux <kernel@wired-net.gr> wrote:
> Hi all,
> can someone tell me how i can listen and accept connections into a port from
> the kernel-space???
> I start listening with the following function :
> 
>         struct socket *sock;
>         struct sockaddr_in sin;
>         int error=0;
> 
>         error=sock_create(PF_INET,SOCK_STREAM,IPPROTO_TCP,&sock);
> 
>         sin.sin_family = AF_INET;
>         sin.sin_addr.s_addr = INADDR_ANY;
>         sin.sin_port = htons((unsigned short)port);
> 
>         error=sock->ops->bind(sock,(struct sockaddr*)&sin,sizeof(sin));
>         sock->ops->listen(sock,48);
> 
> How about accepting connections and sending some kind of a message for
> beggining?
> Can someone help me please.

Looking at khttpd code in 2.4 kernel may  help you .

http://lxr.linux.no/source/net/khttpd/sockets.c?v=2.4.28

Regards
Niraj

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-17 11:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-17 10:44 [PATCH 2.6.12-rc4 13/15] include: update device attribute callbacks Yani Ioannou
2005-05-17 11:19 ` 2.6 kernel network programming linux
2005-05-17 11:44   ` Niraj kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).