Changeset de74f88
- Timestamp:
- 02/13/15 13:51:44 (6 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
- 1ebc4bd
- Parents:
- 4631115
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_dag25.c
r4631115 rde74f88 890 890 891 891 /* DUCK doesn't have a format header */ 892 893 894 895 896 897 if ((ioctl(FORMAT_DATA->device->fd, LIBTRACE_DUCK_IOCTL,898 899 892 packet->header = 0; 893 packet->payload = packet->buffer; 894 895 /* No need to check if we can get DUCK or not - we're modern 896 * enough so just grab the DUCK info */ 897 if ((ioctl(FORMAT_DATA_FIRST->device->fd, LIBTRACE_DUCK_IOCTL, 898 (duckinf_t *)packet->payload) < 0)) { 899 trace_set_err(libtrace, errno, "Error using DUCK ioctl"); 900 900 DUCK.duck_freq = 0; 901 902 903 904 901 return -1; 902 } 903 904 packet->type = LIBTRACE_DUCK_VERSION; 905 905 906 906 /* Set the packet's trace to point at a DUCK trace, so that the 907 907 * DUCK format functions will be called on the packet rather than the 908 908 * DAG ones */ 909 910 911 912 913 909 if (!DUCK.dummy_duck) 910 DUCK.dummy_duck = trace_create_dead("duck:dummy"); 911 packet->trace = DUCK.dummy_duck; 912 DUCK.last_duck = DUCK.last_pkt; 913 return sizeof(duckinf_t); 914 914 } 915 915 … … 1217 1217 libtrace_packet_t *packet) 1218 1218 { 1219 int size = 0; 1219 1220 dag_record_t *erfptr = NULL; 1220 1221 int numbytes = 0; … … 1227 1228 maxwait.tv_usec = 250000; 1228 1229 1229 1230 /* Check if we're due for a DUCK report */ 1230 1231 size = dag_get_duckinfo(libtrace, packet); 1231 1232
Note: See TracChangeset
for help on using the changeset viewer.