Date: Wed, 09 Dec 1998 10:20:40 +0100 From: Nguyen Tuan Hung <tmphung@lt.eth.ericsson.se> To: freebsd-questions@FreeBSD.ORG Subject: Configuring FreeBSD kernel. Message-ID: <366E40E8.EDDD3B69@lt.eth.ericsson.se>
next in thread | raw e-mail | index | archive | help
Hi!
I'm reading the /sys/netinet/ip_input.c file the ip_init() menthod,
you wrote "
/*****************************************************/
/*
* IP initialition. Fill in IP protocol switch table
*If all protocols not implemented go to raw IP protocol handler
*/
/******************************************************/
What does mean this?
How do I do it. What need I do in kernel, I don't want use kernel's TCP
protocol instead my written NEW_TCP protocol.
Example I like to write deamon program that open SOCK_RAW socket, and
know receive incoming TCP packet (whithout Berkeley packet filter)
The source code:
/* server.c */
int fd;
fd = socket (AF_INET, SOCK_RAW,IPPROTO_TCP);
.
.
.
while(1) {
recvfrom(fd,buf, len,0, NULL,NULL);
fprintf(stderr, "coming dat a%s \n",buf);
}
close(fd);
/*end server.c */
/* client.c */
int fd
fd = socket(AF_INET, SOCK_STREAM, 0);
.
.
.
.
send(fd,buf, len);
close(fd);
/*end client.c */
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?366E40E8.EDDD3B69>
