Subject: CVS commit: basesrc
To: None <source-changes@netbsd.org>
From: Jason R Thorpe <thorpej@netbsd.org>
List: source-changes
Date: 12/29/2000 00:12:07
Module Name:	basesrc
Committed By:	thorpej
Date:		Thu Dec 28 22:12:07 UTC 2000

Modified Files:
	basesrc/lib/libpcap: scanner.l

Log Message:
Add names for some ICMP and TCP protocol header offsets:
	- icmptype (offset of ICMP type field)
	- icmpcode (offset of ICMP code field)
	- tcpflags (offset of TCP flags field)
and field values:
	- icmp-echoreply, icmp-unreach, icmp-sourcequench,
	  icmp-redirect, icmp-echo, icmp-routeradvert,
	  icmp-routersolicit, icmp-timxceed, icmp-paramprob,
	  icmp-tstamp, icmp-tstampreply, icmp-ireq, icmp-ireqreply,
	  icmp-maskreq, icmp-maskreply
	- tcp-fin, tcp-syn, tcp-rst, tcp-push, tcp-ack, tcp-urg

This allows expressions like the following:

	icmp[0] = 3
	(tcp[13] & 0x02) != 0

to be written as:

	icmp[icmptype] = icmp-unreach
	(tcp[tcpflags] & tcp-syn) != 0

which is a bit more user-friendly for e.g. writing packet filter rules.


To generate a diff of this commit:
cvs rdiff -r1.11 -r1.12 basesrc/lib/libpcap/scanner.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.