- Timestamp:
- 10/16/06 16:50:08 (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:
- 4362100
- Parents:
- 0c835956
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_linux.c
r99ff3d9 r3ed9a80 77 77 malloc(sizeof(struct libtrace_format_data_t)); 78 78 FORMAT(libtrace->format_data)->fd = -1; 79 FORMAT(libtrace->format_data)->promisc = 0;79 FORMAT(libtrace->format_data)->promisc = -1; 80 80 FORMAT(libtrace->format_data)->snaplen = 65536; 81 81 … … 122 122 return -1; 123 123 } 124 /* enable promisc mode when listening on an interface */ 125 if (addr.sll_ifindex!=0) { 124 125 /* If promisc hasn't been specified, set it to "true" if we're 126 * capturing on one interface, or "false" if we're capturing on 127 * all interfaces. 128 */ 129 if (FORMAT(libtrace->format_data)->promisc==-1) { 130 if (addr.sll_ifindex!=0) 131 FORMAT(libtrace->format_data)->promisc=1; 132 else 133 FORMAT(libtrace->format_data)->promisc=0; 134 } 135 136 if (FORMAT(libtrace->format_data)->promisc) { 126 137 struct packet_mreq mreq; 127 138 socklen_t socklen = sizeof(mreq);
Note: See TracChangeset
for help on using the changeset viewer.