Skip to content

Commit

Permalink
Fix man page for #581 and adapt also the -s statistics xip -> natip
Browse files Browse the repository at this point in the history
  • Loading branch information
phaag committed Nov 24, 2024
1 parent 856bbc0 commit e221092
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 34 deletions.
50 changes: 28 additions & 22 deletions man/nfdump.1
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ source IP addresses
destination IP addresses
.It Cm ip
any (src or dst) IP addresses
.It Cm srcgeo
Two letter src geo country code of src IP address
.It Cm dstgeo
Two letter dst geo country code of dst IP address
.It Cm geo
Two letter src/dst geo country code of src/dst IP address
.It Cm nhip
next hop IP addresses
.It Cm nhbip
Expand Down Expand Up @@ -468,10 +474,6 @@ destination AS numbers
source AS organisations and numbers
.It Cm dstasn
destination AS organisations and numbers
.It Cm srcgeo
2 letter geo source country code
.It Cm dstgeo
2 letter geo destination country code
.It Cm as
any (source or destination) AS numbers
.It Cm asn
Expand Down Expand Up @@ -561,14 +563,18 @@ NSEL/ASA statistics
NSEL/ASA event
.It Cm xevent
NSEL/ASA extended event
.It Cm xsrcip
NSEL/ASA translated src IP address
.It Cm xsrcport
NSEL/ASA translated src port
.It Cm xdstip
NSEL/ASA translated dst IP address
.It Cm xdstport
NSEL/ASA translated dst port
.It Cm natsrcip
NSEL/ASA nat src IP address
.It Cm natdstip
NSEL/ASA nat dst IP address
.It Cm natip
NSEL/ASA nat src/dst IP addresses
.It Cm nat srcport
NSEL/ASA nat src port
.It Cm natdstport
NSEL/ASA nat dst port
.It Cm natport
NSEL/ASA nat src/dst port
.It Cm iacl
NSEL/ASA ingress ACL
.It Cm iace
Expand Down Expand Up @@ -1446,22 +1452,22 @@ which may be
True, if the comparison of the extended event field of the event record matches
.Ar num
.Pp
.It Cm xip Ar ipaddr
.It Cm src xip Ar ipaddr
.It Cm dst xip Ar ipaddr
.It Cm nat ip Ar ipaddr
.It Cm src nat ip Ar ipaddr
.It Cm dst nat ip Ar ipaddr
True, if the field of the translated source or destination IP address matches
.Ar ipaddr
if
.Cm xip
.Cm nat ip
is specified without
.Cm src
or
.Cm dst
both IP addresses may match.
.Pp
.It Cm xport Ar ipaddr
.It Cm src xport Ar ipaddr
.It Cm dst xport Ar ipaddr
.It Cm nat port Ar ipaddr
.It Cm src nat port Ar ipaddr
.It Cm dst nat port Ar ipaddr
True, if the field of the translated source or destination IP address matches
.Ar ipaddr
if
Expand All @@ -1472,9 +1478,9 @@ or
.Cm dst
both ports may match.
.Pp
.It Cm xnet Ar network/mask
.It Cm src xnet Ar network/mask
.It Cm dst xnet Ar network/mask
.It Cm nat net Ar network/mask
.It Cm src nat net Ar network/mask
.It Cm dst nat net Ar network/mask
True if the translated source or destination IP address matches
.Ar network
if mask
Expand Down
24 changes: 12 additions & 12 deletions src/nfdump/nfstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,18 @@ static struct StatParameter_s {
{"event", " Event", {EXnselCommonID, OFFfwEvent, SIZEfwEvent, 0}, IS_EVENT, NULL},
{"xevent", " Event", {EXnselCommonID, OFFfwXevent, SIZEfwXevent, 0}, IS_NUMBER, NULL},
{"nat", "NAT Event", {EXnatCommonID, OFFnatEvent, SIZEnatEvent, 0}, IS_EVENT, NULL},
{"xsrcip", "X-Src IP Addr", {EXnatXlateIPv4ID, OFFxlateSrc4Addr, SIZExlateSrc4Addr, AF_INET}, IS_IPADDR, NULL},
{"xsrcip", NULL, {EXnatXlateIPv6ID, OFFxlateSrc6Addr, SIZExlateSrc6Addr, AF_INET6}, IS_IPADDR, NULL},
{"xdstip", "X-Dst IP Addr", {EXnatXlateIPv4ID, OFFxlateDst4Addr, SIZExlateDst4Addr, AF_INET}, IS_IPADDR, NULL},
{"xdstip", NULL, {EXnatXlateIPv6ID, OFFxlateDst6Addr, SIZExlateDst6Addr, AF_INET6}, IS_IPADDR, NULL},
{"xip", "X-IP Addr", {EXnatXlateIPv4ID, OFFxlateSrc4Addr, SIZExlateSrc4Addr, AF_INET}, IS_IPADDR, NULL},
{"xip", NULL, {EXnatXlateIPv6ID, OFFxlateSrc6Addr, SIZExlateSrc6Addr, AF_INET6}, IS_IPADDR, NULL},
{"xip", NULL, {EXnatXlateIPv4ID, OFFxlateDst4Addr, SIZExlateDst4Addr, AF_INET}, IS_IPADDR, NULL},
{"xip", NULL, {EXnatXlateIPv6ID, OFFxlateDst6Addr, SIZExlateDst6Addr, AF_INET6}, IS_IPADDR, NULL},
{"xsrcport", "X-Src Port", {EXnatXlatePortID, OFFxlateSrcPort, SIZExlateSrcPort, 0}, IS_NUMBER, NULL},
{"xdstport", "X-Dst Port", {EXnatXlatePortID, OFFxlateDstPort, SIZExlateDstPort, 0}, IS_NUMBER, NULL},
{"xport", "X-Port", {EXnatXlatePortID, OFFxlateSrcPort, SIZExlateSrcPort, 0}, IS_NUMBER, NULL},
{"xport", NULL, {EXnatXlatePortID, OFFxlateDstPort, SIZExlateDstPort, 0}, IS_NUMBER, NULL},
{"natsrcip", "X-Src IP Addr", {EXnatXlateIPv4ID, OFFxlateSrc4Addr, SIZExlateSrc4Addr, AF_INET}, IS_IPADDR, NULL},
{"natsrcip", NULL, {EXnatXlateIPv6ID, OFFxlateSrc6Addr, SIZExlateSrc6Addr, AF_INET6}, IS_IPADDR, NULL},
{"natdstip", "X-Dst IP Addr", {EXnatXlateIPv4ID, OFFxlateDst4Addr, SIZExlateDst4Addr, AF_INET}, IS_IPADDR, NULL},
{"natdstip", NULL, {EXnatXlateIPv6ID, OFFxlateDst6Addr, SIZExlateDst6Addr, AF_INET6}, IS_IPADDR, NULL},
{"natip", "X-IP Addr", {EXnatXlateIPv4ID, OFFxlateSrc4Addr, SIZExlateSrc4Addr, AF_INET}, IS_IPADDR, NULL},
{"natip", NULL, {EXnatXlateIPv6ID, OFFxlateSrc6Addr, SIZExlateSrc6Addr, AF_INET6}, IS_IPADDR, NULL},
{"natip", NULL, {EXnatXlateIPv4ID, OFFxlateDst4Addr, SIZExlateDst4Addr, AF_INET}, IS_IPADDR, NULL},
{"natip", NULL, {EXnatXlateIPv6ID, OFFxlateDst6Addr, SIZExlateDst6Addr, AF_INET6}, IS_IPADDR, NULL},
{"natsrcport", "X-Src Port", {EXnatXlatePortID, OFFxlateSrcPort, SIZExlateSrcPort, 0}, IS_NUMBER, NULL},
{"natdstport", "X-Dst Port", {EXnatXlatePortID, OFFxlateDstPort, SIZExlateDstPort, 0}, IS_NUMBER, NULL},
{"natport", "X-Port", {EXnatXlatePortID, OFFxlateSrcPort, SIZExlateSrcPort, 0}, IS_NUMBER, NULL},
{"natport", NULL, {EXnatXlatePortID, OFFxlateDstPort, SIZExlateDstPort, 0}, IS_NUMBER, NULL},
{"iacl", "Ingress ACL", {EXnselAclID, OFFingressAcl, SIZEingressAcl, 0}, IS_HEX, NULL},
{"eacl", "Egress ACL", {EXnselAclID, OFFegressAcl, SIZEegressAcl, 0}, IS_HEX, NULL},
// {"iace", "Ingress ACL", {EXnselAclID, OFFingressAcl, SIZEingressAcl, 0}, IS_HEX, NULL},
Expand Down

0 comments on commit e221092

Please sign in to comment.