Return to BSD News archive
#! rnews 2433 bsd Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!news1.digital.com!pa.dec.com!depot.mro.dec.com!nntpd.lkg.dec.com!not-for-mail From: "Michael C. Cambria" <cambria@snads.lkg.dec.com> Newsgroups: comp.unix.bsd.freebsd.misc,comp.protocols.tcp-ip Subject: Q: Raw sockets to buypass tcp/udp? Date: Wed, 16 Apr 1997 14:18:57 -0400 Organization: Systems & Communications Sciences, Inc. Lines: 38 Message-ID: <33551811.6113@snads.lkg.dec.com> NNTP-Posting-Host: snads.lkg.dec.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (X11; I; OSF1 V3.2 alpha) Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39207 comp.protocols.tcp-ip:53093 Hi, I need to prototype sone networking software. Since I can pick how and where this is done, I'm choosing FreeBSD 2.2.1 First, I need to be able to send and receive my own "layer 3" packets but continue to use the FreeBSD IP. Put simply, I want to replace TCP and UDP with my own. What is the proper way to do this? Is it even possible? Second, I need to put my own 802.2 packets (ie. no IP layer) for my own "layer 2" on the LAN. What is the proper way to do this? In both cases, I need the OS transparently pass thru what I'm sending and receiving (if possible.) I've looked thru Stevens "Unix Network Programming", the sockets FAQ and briefly at the sources. I've a feeling the sources will be the only way, so I'm looking for help on where to look first. For my own "layer 3": I've looked at: socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) a bit, since "ping" lets one build their own ICMP header and the OS will prefix what I send with the IP header. Should this be used? It doesn't "feel right" as the protocol I'm using is not ICMP. I've also considered: socket(PF_INET, SOCK_RAW, IPPROTO_RAW) but I'm _guessing_ that this would be the way to send/rcv directly on the wire myself (ie. build my own "layer 2"). Thanks for any help, pointers etc. MikeC -- Michael C. Cambria Voice: 617 643 6250 Systems & Communications Sciences, Inc. Fax: 617 643 6251 138 Wright Street Internet: cambria@world.std.com Arlington, Ma. 02174 CompuServe: 71552,2531