From: "linux" <kernel@wired-net.gr>
To: <linux-kernel@vger.kernel.org>
Subject: 2.6 kernel network programming
Date: Tue, 17 May 2005 14:19:56 +0300 [thread overview]
Message-ID: <000b01c55ad2$5acaf690$0101010a@dioxide> (raw)
In-Reply-To: 2538186705051703441093903a@mail.gmail.com
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.
next prev parent reply other threads:[~2005-05-17 11:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2005-05-17 11:44 ` 2.6 kernel network programming Niraj kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000b01c55ad2$5acaf690$0101010a@dioxide' \
--to=kernel@wired-net.gr \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox