Changeset 799 for trunk/lib/format_wag.c


Ignore:
Timestamp:
05/12/06 17:07:59 (7 years ago)
Author:
spa1
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
  • trunk/lib/format_wag.c

    r782 r799  
    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.