Permalink
Browse files

More consistent alliasing for net keyword

  • Loading branch information...
ImoStocky committed Jul 30, 2017
1 parent 7335282 commit f35a3ef2ca37e772935fe1ab45ef3db137ba4cfb
Showing with 6 additions and 6 deletions.
  1. +3 −3 include/libnf.h
  2. +3 −3 src/fields.c
View
@@ -183,8 +183,6 @@ typedef struct lnf_brec1_s {
#define LNF_FLD_SAMPLER_INTERVAL 0x4a
#define LNF_FLD_SAMPLER_ID 0x4b
/* Added stub for compatibility, bears same identification as ADDR variants */
#define LNF_FLD_SRCNET 0x4c
#define LNF_FLD_DSTNET 0x4d
/* computed and extra fields */
#define LNF_FLD_CALC_DURATION 0xA0 /* computed : duration in msec */
@@ -201,7 +199,7 @@ typedef struct lnf_brec1_s {
#define LNF_FLD_PAIR_AS 0xC2 /* src as + dst as */
#define LNF_FLD_PAIR_IF 0xC3 /* in if + out if */
#define LNF_FLD_PAIR_VLAN 0xC4 /* src vlan + dst vlan */
#define LNF_FLD_PAIR_NET 0xC5 /* src ip + dst ip compatibility*/
#define LNF_FLD_PAIR_ADDR_ALIAS 0xC5 /* src ip + dst ip compatibility*/
/* alias fields - for backward compatibility */
#define LNF_FLD_DPKTS_ALIAS 0x60
@@ -214,6 +212,8 @@ typedef struct lnf_brec1_s {
#define LNF_FLD_ICMP_CODE_ALIAS 0x67
#define LNF_FLD_ICMP_TYPE_ALIAS 0x68
#define LNF_FLD_TCP_FLAGS_ALIAS 0x69
#define LNF_FLD_SRCADDR_ALIAS 0x70
#define LNF_FLD_DSTADDR_ALIAS 0x71
#define LNF_FLD_TERM_ 0xFF /* ID of last field */
View
@@ -1394,7 +1394,7 @@ lnf_field_def_t lnf_fields_def[] = {
lnf_field_fget_DSTADDR,
lnf_field_fset_DSTADDR},
[LNF_FLD_SRCNET] = {
[LNF_FLD_SRCADDR_ALIAS] = {
LNF_ADDR, sizeof(LNF_ADDR_T), LNF_AGGR_KEY, LNF_SORT_ASC,
{LNF_FLD_ZERO_, LNF_FLD_ZERO_, LNF_FLD_ZERO_, LNF_FLD_ZERO_},
{LNF_FLD_ZERO_, LNF_FLD_ZERO_},
@@ -1404,7 +1404,7 @@ lnf_field_def_t lnf_fields_def[] = {
lnf_field_fget_SRCADDR,
lnf_field_fset_SRCADDR},
[LNF_FLD_DSTNET] = {
[LNF_FLD_DSTADDR_ALIAS] = {
LNF_ADDR, sizeof(LNF_ADDR_T), LNF_AGGR_KEY, LNF_SORT_ASC,
{LNF_FLD_ZERO_, LNF_FLD_ZERO_, LNF_FLD_ZERO_, LNF_FLD_ZERO_},
{LNF_FLD_ZERO_, LNF_FLD_ZERO_},
@@ -2189,7 +2189,7 @@ lnf_field_def_t lnf_fields_def[] = {
lnf_field_fget_SRCADDR,
lnf_field_fset_SRCADDR},
[LNF_FLD_PAIR_NET] = {
[LNF_FLD_PAIR_ADDR_ALIAS] = {
LNF_ADDR, sizeof(LNF_ADDR_T), LNF_AGGR_KEY, LNF_SORT_NONE,
{LNF_FLD_ZERO_, LNF_FLD_ZERO_, LNF_FLD_ZERO_, LNF_FLD_ZERO_},
{LNF_FLD_SRCADDR, LNF_FLD_DSTADDR},

0 comments on commit f35a3ef

Please sign in to comment.