- Timestamp:
- 08/28/06 16:55:46 (16 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:
- 64cfd4d
- Parents:
- 4a4cc39
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_linux.c
rd0fd73c r3b10b9f 135 135 } 136 136 137 setsockopt(FORMAT(libtrace->format_data)->fd,137 if (setsockopt(FORMAT(libtrace->format_data)->fd, 138 138 SOL_SOCKET, 139 139 SO_TIMESTAMP, 140 140 &one, 141 sizeof(one)); 141 sizeof(one))==-1) { 142 perror("setsockopt(SO_TIMESTAMP)"); 143 } 142 144 143 145 return 0; … … 210 212 #define LIBTRACE_MIN(a,b) ((a)<(b) ? (a) : (b)) 211 213 212 /* 20 should be enough*/213 #define CMSG_BUF_SIZE 20214 /* 20 isn't enough on x86_64 */ 215 #define CMSG_BUF_SIZE 128 214 216 static int linuxnative_read_packet(libtrace_t *libtrace, libtrace_packet_t *packet) 215 217 { … … 264 266 if (cmsg->cmsg_level == SOL_SOCKET 265 267 && cmsg->cmsg_type == SO_TIMESTAMP 266 && cmsg->cmsg_len == CMSG_LEN(sizeof(struct timeval))) {268 && cmsg->cmsg_len <= CMSG_LEN(sizeof(struct timeval))) { 267 269 memcpy(&hdr->ts, CMSG_DATA(cmsg), 268 270 sizeof(struct timeval));
Note: See TracChangeset
for help on using the changeset viewer.