Raw AF_INET ICMP sockets
Mike Muuss
mike at BRL.ARPA
Mon Aug 12 12:41:29 AEST 1985
As the comment on the front of PING.C says, it depends on
your having installed various fixes to your kernel.
Most importantly, you have to change /sys/netinet/in_proto.c:
Remove:
< { 0, PF_INET, IPPROTO_ICMP, 0,
< icmp_input, 0, 0, 0,
< 0,
< 0, 0, 0, 0,
< },
At the end of the protosw table, add:
> { SOCK_RAW, PF_INET, IPPROTO_ICMP, PR_ATOMIC|PR_ADDR,
> icmp_input, rip_output, 0, 0,
> raw_usrreq,
> 0, 0, 0, 0,
> },
This will be enough to get you started. There are bugs in
ip_input.c as well; contact me by electronic mail if you
need these changes too; they are too numerous to post here.
Best,
-Mike Muuss
(301)-278-6678
AV 283-6678
FTS 939-6678
ArpaNet: Mike @ BRL
UUCP: ...!{decvax,cbosgd}!brl-bmd!mike
Postal:
Mike Muuss
Leader, Advanced Computer Systems Team
Computer Science and Mathematics Branch
Systems Engineering and Concepts Analysis Division
U.S. Army Ballistic Research Laboratory
Attn: AMXBR-SECAD (Muuss)
APG, MD 21005
More information about the Comp.unix.wizards
mailing list