[comp.unix.questions] example code using SOCK_RAW

coleman@cam.nist.gov (Sean Sheridan Coleman X5672) (05/01/91)

I am looking for some example code that uses SOCK_RAW and
IPPROTO_RAW. Examples can assist me in figuring out how how
the options above are used and implemented. 


Thanks in advance 

Sean Coleman
coleman@bldrdoc.gov

NIST
Boulder, CO

jseymour@medar.com (James Seymour) (05/02/91)

In article <8435@alpha.cam.nist.gov> coleman@cam.nist.gov (Sean Sheridan Coleman X5672) writes:
:I am looking for some example code that uses SOCK_RAW and
:IPPROTO_RAW. Examples can assist me in figuring out how how
:the options above are used and implemented. 
:

You may wish to check out the book "UNIX Network Programming" by
W. Richard Stevens (ISBN 0-13-949876-1 hardcover).  It's a very good
tutorial and reference on UNIX network issues.  There is lots of
example code in this book.  Also, the example code from the book is
available from somewhere on the net as "netprog".  Lest I lead you
astray, I don't *recall* there being example code for using raw
sockets [I've been getting up to speed on so many new things lately,
my mind is turning to mush :-)].  For what it's worth, I do recall
that you must be root to open a raw socket tho...  Good luck.

:Thanks in advance 
:
:Sean Coleman
:coleman@bldrdoc.gov
:
:NIST
:Boulder, CO

-- 
Jim Seymour				| Medar, Inc.
...!uunet!medar!jseymour		| 38700 Grand River Ave.
jseymour@medar.com			| Farmington Hills, MI. 48331
CIS: 72730,1166  GEnie: jseymour	| FAX: (313)477-8897