From e221092bee8ba9b67ca145ed43d6fc6355dcc88d Mon Sep 17 00:00:00 2001 From: Peter Haag Date: Sun, 24 Nov 2024 12:32:37 +0100 Subject: [PATCH] Fix man page for #581 and adapt also the -s statistics xip -> natip --- man/nfdump.1 | 50 +++++++++++++++++++++++++-------------------- src/nfdump/nfstat.c | 24 +++++++++++----------- 2 files changed, 40 insertions(+), 34 deletions(-) diff --git a/man/nfdump.1 b/man/nfdump.1 index 407ad4ea..1469e424 100755 --- a/man/nfdump.1 +++ b/man/nfdump.1 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/src/nfdump/nfstat.c b/src/nfdump/nfstat.c index e4ad2f83..db971491 100644 --- a/src/nfdump/nfstat.c +++ b/src/nfdump/nfstat.c @@ -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},