On Feb 27, 2012, at 9:40 AM, Nuno Martins wrote:

> I'm having a trouble to find the purpose of pid identifier in grammar.y
> file. #line 398
> 
> This identifier is related to what protocol ?
> 
> I'm supposing that this pid is not related in any way with processes (like
> pid process identifier), right?

Right.

The grammar rules for pid are

pid:      nid
        | qid and id
        | qid or id
        ;

so it's either a nid by itself:

nid:      ID
        | HID '/' NUM
        | HID NETMASK HID
        | HID
        | HID6 '/' NUM
        | HID6
        | EID
        | AID
        | not id
        ;

which is a "network ID" (host name, IPv4 address+netmask, IPv6 address + 
CIDRish number, Ethernet ID, ATM ID, or a negated version of any of those), or 
it's a qid ANDed or ORed with an id:

qid:      pnum
        | pid
        ;

pnum:     NUM
        | paren pnum ')'
        ;

id:       nid
        | pnum 
        | paren pid ')'
        ;

The "p" in "pid" presumably refers to Parentheses, not to Protocols or 
Processes; the "pid" rule exists not to define a symbol that has some inherent 
semantics the user would care about, it just exists to allow the 
parenthesization rules of the libpcap expression syntax to be stated.-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to