Changeset a3041a4
- Timestamp:
- 01/10/12 14:15:58 (9 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:
- 8753bb8
- Parents:
- a0ec6f1
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/tutorial/headerdemo.c
rd025ff7 ra3041a4 219 219 uint32_t remaining; 220 220 uint32_t prev_rem; 221 libtrace_ip_t *ip;222 221 libtrace_ip6_t *ip6; 223 222 … … 243 242 case 0x0800: /* IPv4 */ 244 243 /* Skip past the IPv4 header */ 245 ip = (libtrace_ip_t *)ip_hdr;246 244 nexthdr = trace_get_payload_from_ip(ip_hdr, &protocol, 247 245 &remaining); … … 332 330 } 333 331 332 /* If we don't have any post-transport payload, just return the 333 * transport header size */ 334 if (!nexthdr) 335 return trans_size; 336 334 337 /* Determine how many bytes we just skipped over and add it to the 335 338 * total transport size */ -
lib/format_legacy.c
r997614d ra3041a4 141 141 * other platforms, e.g. *BSDs, Windows */ 142 142 struct tm tm; 143 char *tz;144 143 time_t ret; 145 144 … … 155 154 tm.tm_isdst = -1; /* forces check for summer time */ 156 155 157 tz =getenv("TZ");156 getenv("TZ"); 158 157 if (putenv("TZ=Pacific/Auckland")) { 159 158 perror("putenv"); … … 440 439 uint32_t hdr_ts; 441 440 442 double dts;443 444 441 legacy_nzix_t *legacy = (legacy_nzix_t *)packet->header; 445 442 … … 461 458 462 459 463 dts = tv.tv_sec + (double)tv.tv_usec / 1000 / 1000;460 /*dts = tv.tv_sec + (double)tv.tv_usec / 1000 / 1000; */ 464 461 return tv; 465 462 -
lib/format_linux.c
r078bd65 ra3041a4 459 459 unsigned char controlbuf[CMSG_BUF_SIZE]; 460 460 struct cmsghdr *cmsg; 461 socklen_t socklen;462 461 int snaplen; 463 462 uint32_t flags = 0; … … 475 474 476 475 hdr=(struct libtrace_linuxnative_header*)packet->buffer; 477 socklen=sizeof(hdr->hdr);478 476 snaplen=LIBTRACE_MIN( 479 477 (int)LIBTRACE_PACKET_BUFSIZE-(int)sizeof(*hdr), -
lib/trace.c
r979a84f4 ra3041a4 501 501 { 502 502 int ret; 503 libtrace_err_t err;504 503 505 504 if (trace_is_err(libtrace)) { … … 522 521 /* Clear the error if there was one */ 523 522 if (trace_is_err(libtrace)) { 524 err =trace_get_err(libtrace);523 trace_get_err(libtrace); 525 524 } 526 525 if (*(int*)value<0 … … 534 533 /* Clear the error if there was one */ 535 534 if (trace_is_err(libtrace)) { 536 err =trace_get_err(libtrace);535 trace_get_err(libtrace); 537 536 } 538 537 libtrace->filter=(libtrace_filter_t *)value; -
tools/traceanon/panon.c
ra8f2692 ra3041a4 144 144 uint8_t rin_input[16]; 145 145 146 uint32_t firstnbits;146 //uint32_t firstnbits; 147 147 148 148 uint32_t result = 0; … … 172 172 // result with this, then proceed 173 173 174 firstnbits = (uint32_t) orig_addr >> (32 - CACHEBITS);174 //firstnbits = (uint32_t) orig_addr >> (32 - CACHEBITS); 175 175 //result = (enc_cache[firstnbits] << (32 - CACHEBITS)); 176 176 -
tools/tracereport/synopt_report.c
r708f9ae ra3041a4 104 104 unsigned char *opt_ptr; 105 105 libtrace_direction_t dir = trace_get_direction(packet); 106 int tcp_payload,len;106 int len; 107 107 unsigned char type, optlen, *data; 108 108 struct tcp_opts opts_seen = {false, false, false, false, false, false}; … … 120 120 if(len == 0) 121 121 return; 122 123 tcp_payload = trace_get_wire_length(packet) - trace_get_capture_length(packet);124 122 125 123 opt_ptr = (unsigned char *)tcp + sizeof (libtrace_tcp_t);
Note: See TracChangeset
for help on using the changeset viewer.