Changeset 9c6aa95 for lib/trace.c
- Timestamp:
- 10/07/05 17:31:17 (17 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:
- 9daf398
- Parents:
- 5c88a60
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/trace.c
rdf6ae1f r9c6aa95 241 241 char *uridata = 0; 242 242 int i = 0; 243 struct stat buf;243 //struct stat buf; 244 244 245 245 trace_err.err_num = E_NOERROR; … … 433 433 parse_cmd(opt_string, &opt_argc, opt_argv, MAXOPTS); 434 434 435 if (libtrace->format->config_output) 435 if (libtrace->format->config_output) { 436 436 return libtrace->format->config_output(libtrace, opt_argc, opt_argv); 437 437 } 438 return -1; 438 439 } 439 440 … … 491 492 return libtrace->format->read_packet(libtrace,packet); 492 493 } 494 return -1; 493 495 } 494 496 … … 508 510 return libtrace->format->write_packet(libtrace, packet); 509 511 } 510 512 return -1; 511 513 } 512 514 … … 555 557 if (eth->type == 0x0008) { 556 558 ipptr=(void*)eth->data; 557 } else if (eth->type = 0x0081) {559 } else if (eth->type == 0x0081) { 558 560 // VLAN 559 561 if ((*(uint16_t *)(eth + 16)) == 0x0008) { … … 892 894 */ 893 895 double trace_get_seconds(const struct libtrace_packet_t *packet) { 894 double seconds ;895 uint64_t ts ;896 double seconds = 0.0; 897 uint64_t ts = 0; 896 898 struct timeval tv; 897 899 … … 1206 1208 * @author Daniel Lawson 1207 1209 */ 1208 int8_t trace_get_server_port(uint8_t protocol , uint16_t source, uint16_t dest) {1210 int8_t trace_get_server_port(uint8_t protocol __attribute__((unused)), uint16_t source, uint16_t dest) { 1209 1211 /* 1210 1212 * * If the ports are equal, return DEST … … 1218 1220 * * flip a coin. 1219 1221 */ 1220 1221 uint16_t server, client; 1222 1222 1223 1223 /* equal */ 1224 if (source == client)1224 if (source == dest) 1225 1225 return USE_DEST; 1226 1226
Note: See TracChangeset
for help on using the changeset viewer.