- Timestamp:
- 12/04/12 15:52:01 (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:
- a464de7
- Parents:
- 528eb6e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_linux.c
r528eb6e rb4c3f61 60 60 #endif 61 61 62 #ifdef HAVE_NETPACKET_PACKET_H _62 #ifdef HAVE_NETPACKET_PACKET_H 63 63 64 64 #include <sys/socket.h> … … 129 129 130 130 131 #endif /* HAVE_NETPACKET_PACKET_H _*/131 #endif /* HAVE_NETPACKET_PACKET_H */ 132 132 133 133 struct tpacket_stats { … … 272 272 273 273 274 #ifdef HAVE_NETPACKET_PACKET_H _274 #ifdef HAVE_NETPACKET_PACKET_H 275 275 276 276 /* … … 780 780 return -1; 781 781 } 782 #endif /* HAVE_NETPACKET_PACKET_H _*/782 #endif /* HAVE_NETPACKET_PACKET_H */ 783 783 784 784 static int linuxnative_prepare_packet(libtrace_t *libtrace UNUSED, … … 852 852 #define CMSG_BUF_SIZE 128 853 853 854 #ifdef HAVE_NETPACKET_PACKET_H _854 #ifdef HAVE_NETPACKET_PACKET_H 855 855 static int linuxnative_read_packet(libtrace_t *libtrace, libtrace_packet_t *packet) 856 856 { … … 1017 1017 */ 1018 1018 while (!(header->tp_status & TP_STATUS_USER)) { 1019 printf("I shouldn't run if event handler\n");1020 1019 pollset.fd = FORMAT(libtrace->format_data)->fd; 1021 1020 pollset.events = POLLIN; … … 1155 1154 1156 1155 /* Notify kernel there are frames to send */ 1157 DATAOUT(trace)->queue = (++DATAOUT(trace)->queue) % TX_MAX_QUEUE; 1156 DATAOUT(trace)->queue ++; 1157 DATAOUT(trace)->queue %= TX_MAX_QUEUE; 1158 1158 if(DATAOUT(trace)->queue == 0){ 1159 1159 sendto(DATAOUT(trace)->fd, … … 1167 1167 1168 1168 } 1169 #endif /* HAVE_NETPACKET_PACKET_H _*/1169 #endif /* HAVE_NETPACKET_PACKET_H */ 1170 1170 1171 1171 static inline libtrace_linktype_t get_libtrace_link_type(uint16_t linktype){ … … 1400 1400 } 1401 1401 1402 #ifdef HAVE_NETPACKET_PACKET_H _1402 #ifdef HAVE_NETPACKET_PACKET_H 1403 1403 if ((FORMAT(trace->format_data)->stats_valid & 1) 1404 1404 || FORMAT(trace->format_data)->stats_valid == 0) { … … 1430 1430 } 1431 1431 1432 #ifdef HAVE_NETPACKET_PACKET_H _1432 #ifdef HAVE_NETPACKET_PACKET_H 1433 1433 if ((FORMAT(trace->format_data)->stats_valid & 2) 1434 1434 || (FORMAT(trace->format_data)->stats_valid==0)) { … … 1448 1448 } 1449 1449 1450 #ifdef HAVE_NETPACKET_PACKET_H _1450 #ifdef HAVE_NETPACKET_PACKET_H 1451 1451 static void linuxnative_help(void) { 1452 1452 printf("linuxnative format module: $Revision$\n");
Note: See TracChangeset
for help on using the changeset viewer.