Changeset da34e20 for lib/format_wag.c


Ignore:
Timestamp:
05/12/06 17:07:59 (15 years ago)
Author:
Shane Alcock <salcock@…>
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:
cd7eec7
Parents:
83445f0
Message:

dag_read_packet now returns a DUCK packet occasionally in place of a regular packet - changing the DUCK frequency will *soon* be a config option
wag_start and wag_pause will now turn the radio on and off, respectively
Added DUCK structures to rt_protocol.h for use with RT_DUCK_* packets
Updated format_rt to deal with RT_DUCK properly
Removed erroneous free(packet->buffer) when packet is not under our control in format_pcap.
Added check for DAG 2.4 in configure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_wag.c

    r431548c5 rda34e20  
    105105        if (S_ISCHR(buf.st_mode)) {
    106106                INPUT.fd = open(libtrace->uridata, O_RDONLY);
     107                if (ioctl (INPUT.fd, CAPTURE_RADIOON, 0) == -1) {
     108                        trace_set_err(libtrace, errno,
     109                                "Could not turn WAG radio on");
     110                        return -1;
     111                }
    107112                return 0;
    108113        }
     
    179184static int wag_pause_input(libtrace_t *libtrace)
    180185{
     186        if (ioctl (INPUT.fd, CAPTURE_RADIOON, 0) == -1) {
     187                trace_set_err(libtrace, errno,
     188                                "Could not turn WAG radio off");
     189        }
    181190        close(INPUT.fd);
    182191        return 0;
     
    184193
    185194static int wag_fin_input(libtrace_t *libtrace) {
     195        ioctl (INPUT.fd, CAPTURE_RADIOON, 0);
    186196        free(libtrace->format_data);
    187197        return 0;
Note: See TracChangeset for help on using the changeset viewer.