- Timestamp:
- 01/29/19 09:59:10 (2 years ago)
- Branches:
- develop
- Children:
- 4e9be84, b32e8f4
- Parents:
- 0af3a4e
- Location:
- lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_erf.c
r0af3a4e r0cc91ee 1086 1086 uint16_t curr_sec = 0; 1087 1087 1088 if (packet == NULL) { 1089 fprintf(stderr, "NULL packet passed into erf_get_meta_section()\n"); 1090 return NULL; 1091 } 1088 1092 if (packet->buffer == NULL) { return NULL; } 1089 1093 … … 1150 1154 /* depending on the datatype we need to ensure the data is 1151 1155 * in host byte ordering */ 1152 if (result->items[result->num-1].datatype == TRACE_META_UINT32 1153 || result->items[result->num-1].datatype == TRACE_META_IPV4) { 1156 if (result->items[result->num-1].datatype == TRACE_META_UINT32) { 1154 1157 uint32_t t = *(uint32_t *)(ptr+sizeof(struct dag_opthdr)); 1155 1158 t = ntohl(t); -
lib/format_pcapng.c
r254c926 r0cc91ee 2032 2032 case(PCAPNG_SIMPLE_PACKET_TYPE): 2033 2033 /* simple packets should not contain any options */ 2034 return TRACE_META_UNKNOWN; 2034 2035 case(PCAPNG_NAME_RESOLUTION_TYPE): 2035 2036 /* todo - needs to handle name resolution options along with 2036 2037 * normal options */ 2038 return TRACE_META_UNKNOWN; 2037 2039 case(PCAPNG_INTERFACE_STATS_TYPE): 2038 2040 return TRACE_META_UINT64; … … 2046 2048 /* todo - needs to handle decryption secrets options along with 2047 2049 * normal options */ 2050 return TRACE_META_UNKNOWN; 2048 2051 default: 2049 2052 return TRACE_META_UNKNOWN; 2050 2053 } 2051 2052 /* If we get this far we dont know the datatype */2053 return TRACE_META_UNKNOWN;2054 2054 } 2055 2055 … … 2070 2070 else if (blocktype == PCAPNG_INTERFACE_TYPE) { ptr += sizeof(pcapng_int_t); } 2071 2071 else if (blocktype == PCAPNG_OLD_PACKET_TYPE) { ptr += sizeof(pcapng_opkt_t); } 2072 else if (blocktype == PCAPNG_NAME_RESOLUTION_TYPE) { ptr += sizeof(pcapng_ epkt_t); }2072 else if (blocktype == PCAPNG_NAME_RESOLUTION_TYPE) { ptr += sizeof(pcapng_nrb_t); } 2073 2073 else if (blocktype == PCAPNG_INTERFACE_STATS_TYPE) { ptr += sizeof(pcapng_stats_t); } 2074 2074 else if (blocktype == PCAPNG_ENHANCED_PACKET_TYPE) { … … 2117 2117 uint16_t tmp; 2118 2118 2119 if (packet == NULL) { 2120 fprintf(stderr, "NULL packet passed into pcapng_get_meta_section()\n"); 2121 return NULL; 2122 } 2119 2123 if (packet->buffer == NULL) { return NULL; } 2120 2124 … … 2179 2183 /* depending on the datatype we need to ensure the data is 2180 2184 * in host byte ordering */ 2181 if (result->items[result->num-1].datatype == TRACE_META_UINT32 2182 || result->items[result->num-1].datatype == TRACE_META_IPV4) { 2183 2185 if (result->items[result->num-1].datatype == TRACE_META_UINT32) { 2184 2186 uint32_t t = *(uint32_t *)(ptr+sizeof(struct pcapng_optheader)); 2185 2187 t = ntohl(t); -
lib/format_pcapng.h
rd0f25d4 r0cc91ee 20 20 21 21 22 #define PCAPNG_OPTION_END 0 x000022 #define PCAPNG_OPTION_END 0 23 23 #define PCAPNG_OPTION_COMMENT 1 24 24 /* Custom option code containing a UTF-8 string */
Note: See TracChangeset
for help on using the changeset viewer.