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
Arlington, Ma. 02174 CompuServe: 71552,2531