- Timestamp:
- 05/04/10 16:08:24 (12 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- 22e626a
- Parents:
- 2f062d8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_tsh.c
rd026488 rd6cd078 153 153 if ((numbytes=wandio_read(libtrace->io, 154 154 buffer2, 155 (size_t)sizeof(libtrace_ip_t) ))156 != sizeof(libtrace_ip_t) ) {155 (size_t)sizeof(libtrace_ip_t)+16)) /* 16 bytes of transport header */ 156 != sizeof(libtrace_ip_t)+16) { 157 157 trace_set_err(libtrace,errno,"read(%s)", 158 158 libtrace->uridata); … … 160 160 } 161 161 162 #if 0 162 163 /* IP Options aren't captured in the trace, so leave room 163 164 * for them, and put the transport header where it "should" be … … 173 174 return -1; 174 175 } 176 #endif 175 177 176 178 if (tsh_prepare_packet(libtrace, packet, packet->buffer, packet->type, … … 204 206 * IP options, but we'll pretend we have them 205 207 */ 208 #if 0 206 209 return 16+((libtrace_ip_t*)packet->payload)->ip_hl*4; 210 #else 211 return 16+sizeof(libtrace_ip_t); 212 #endif 207 213 } 208 214 209 215 static int tsh_get_wire_length(const libtrace_packet_t *packet) { 210 return ((libtrace_ip_t*)packet->payload)->ip_len;216 return ntohs(((libtrace_ip_t*)packet->payload)->ip_len); 211 217 } 212 218
Note: See TracChangeset
for help on using the changeset viewer.