Changeset 8dd1830 for lib/trace.c
- Timestamp:
- 05/09/05 19:20:50 (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:
- 7b4d443
- Parents:
- 828ca90
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/trace.c
r75fc3da r8dd1830 209 209 #ifndef PF_RULESET_NAME_SIZE 210 210 #define PF_RULESET_NAME_SIZE 16 211 #endif 212 213 #ifndef IFNAMSIZ 214 #define IFNAMSIZ 16 211 215 #endif 212 216 … … 1279 1283 pcapptr = (struct pcap_pkthdr *)packet->buffer; 1280 1284 // ick. FIXME 1281 tv.tv_sec = pcapptr->ts.tv_sec; 1282 tv.tv_usec = pcapptr->ts.tv_usec; 1285 tv = pcapptr->ts; 1283 1286 break; 1284 1287 #endif … … 1291 1294 // FIXME: This isn't portable to big-endian machines 1292 1295 ts = trace_get_erf_timestamp(packet); 1293 tv.tv_sec = ts >> 32; 1296 #if __BYTE_ORDER == __BIG_ENDIAN 1297 tv.tv_sec = ts & 0xFFFFFFFF; 1298 #elif __BYTE_ORDER == __LITTLE_ENDIAN 1299 tv.tv_sec = ts >> 32; 1300 #else 1301 #error "What on earth are you running this on?" 1302 #endif 1294 1303 ts = (1000000 * (ts & 0xffffffffULL)); 1295 1304 ts += (ts & 0x80000000ULL) << 1;
Note: See TracChangeset
for help on using the changeset viewer.