- Timestamp:
- 01/24/19 15:35:35 (2 years ago)
- Branches:
- develop
- Children:
- 0cc91ee
- Parents:
- 5299c55
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_erf.c
r254c926 r0af3a4e 956 956 case (ERF_PROV_LOC_NAME): return "Capture Location"; 957 957 case (ERF_PROV_FLOW_HASH_MODE): return "Flow Hash Mode"; 958 case (ERF_PROV_FILTER): return "Filter"; 958 959 case (ERF_PROV_TUNNELING_MODE): return "Tunneling Mode"; 960 case (ERF_PROV_ROTFILE_NAME): return "Rotfile Name"; 959 961 case (ERF_PROV_LOC_DESCR): return "Location Description"; 960 962 case (ERF_PROV_MEM): return "Stream Buffer Memory"; … … 1020 1022 case (ERF_PROV_MODULE_NUM): return TRACE_META_UINT32; 1021 1023 case (ERF_PROV_LOC_NAME): return TRACE_META_STRING; 1024 case (ERF_PROV_FILTER): return TRACE_META_STRING; 1022 1025 case (ERF_PROV_FLOW_HASH_MODE): return TRACE_META_UINT32; 1023 1026 case (ERF_PROV_TUNNELING_MODE): return TRACE_META_UINT32; 1027 case (ERF_PROV_ROTFILE_NAME): return TRACE_META_STRING; 1024 1028 case (ERF_PROV_LOC_DESCR): return TRACE_META_STRING; 1025 1029 case (ERF_PROV_MEM): return TRACE_META_UINT64; … … 1081 1085 uint16_t remaining; 1082 1086 uint16_t curr_sec = 0; 1083 int in_section = 0;1084 1087 1085 1088 if (packet->buffer == NULL) { return NULL; } … … 1098 1101 result->num = 0; 1099 1102 1100 while (remaining > sizeof(dag_sec_t) && curr_sec != 0xFFFF) {1103 while (remaining > sizeof(dag_sec_t)) { 1101 1104 1102 1105 /* Get the current section/option header */ … … 1108 1111 || ntohs(sec->type) == ERF_PROV_SECTION_INTERFACE) { 1109 1112 1110 if (in_section == 0) { 1111 curr_sec = ntohs(sec->type); 1112 } else { 1113 /* Used to indicate section end */ 1114 curr_sec = 0xFFFF; 1115 } 1113 curr_sec = ntohs(sec->type); 1116 1114 } 1117 1115 … … 1123 1121 && ntohs(sec->type) != ERF_PROV_SECTION_MODULE 1124 1122 && ntohs(sec->type) != ERF_PROV_SECTION_INTERFACE) { 1125 1126 /* Indicate a section has been found */1127 in_section = 1;1128 1123 1129 1124 result->num += 1; … … 1170 1165 ptr+sizeof(struct dag_opthdr), ntohs(sec->len)); 1171 1166 } 1172 1173 1167 } 1174 1175 1168 } 1176 1169 … … 1185 1178 } 1186 1179 1187 /* If the result structure has resultmatches were found */1180 /* If the result num > 0 matches were found */ 1188 1181 if (result->num > 0) { 1189 1182 return (void *)result; -
lib/format_erf.h
r254c926 r0af3a4e 52 52 #define ERF_PROV_MODULE_NUM 31 53 53 #define ERF_PROV_LOC_NAME 34 54 #define ERF_PROV_FILTER 36 54 55 #define ERF_PROV_FLOW_HASH_MODE 37 55 56 #define ERF_PROV_TUNNELING_MODE 38 57 #define ERF_PROV_ROTFILE_NAME 43 56 58 #define ERF_PROV_LOC_DESCR 46 57 59 #define ERF_PROV_APP_VERSION 47
Note: See TracChangeset
for help on using the changeset viewer.