4.2 networking question
Chris Torek
chris at umcp-cs.UUCP
Tue Jan 22 02:50:37 AEST 1985
> Path: umcp-cs!seismo!harvard!talcott!panda!teddy!genrad!decvax!
> bellcore!allegra!ulysses!mhuxr!mhuxj!houxm!ihnp4!zehntel!dual!amdcad!
> fortune!wdl1!clt
Great galloping horney todes! [Tryinta get inta the spirit for Dallas...)
> What I am doing: trying to establish a raw socket,
> with protocol number 15:
> #define XNETPROTO 15
> ...
> socknbr = socket(AF_INET,SOCK_RAW,XNETPROTO);
> This call is returning the "Protocol not supported" error.
> By the way, I have SETUIDed, so it is running in supervisor mode,
> as it should, for using raw sockets.
Waaall, a couple of things: first, AF_INET SOCK_RAW will get you a raw
connection. But you don't need (or want) a protocol field. Instead,
you get to read and write headers yourself. Lessee, to get to the IMP
(or whatever), you want to bind() in AF_INET to the interface address,
I think.
I'm sure y'all 'r gonna jump on me if I missed anything, so I'll
jest mosey on outta here now ...
--
(This line accidently left nonblank.)
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at maryland
More information about the Comp.unix.wizards
mailing list