Changeset 737


Ignore:
Timestamp:
04/25/06 16:37:02 (7 years ago)
Author:
perry
Message:

Fix support for writing on interfaces

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/format_linux.c

    r729 r737  
    243243        hdr.sll_family = AF_PACKET; 
    244244        hdr.sll_protocol = 0; 
    245         hdr.sll_ifindex = if_nametoindex(packet->trace->uridata); 
     245        hdr.sll_ifindex = if_nametoindex(trace->uridata); 
    246246        hdr.sll_hatype = 0; 
    247247        hdr.sll_pkttype = 0; 
  • trunk/lib/format_pcapfile.c

    r735 r737  
    6767static uint16_t swaps(libtrace_t *libtrace, uint16_t num) 
    6868{ 
     69        /* to deal with open_dead traces that might try and use this 
     70         * if we don't have any per trace data, assume host byte order 
     71         */ 
     72        if (!DATA(libtrace)) 
     73                return num; 
    6974        if (DATA(libtrace)->header.magic_number == 0xd4c3b2a1) 
    7075                return ((num<<8)&0xFF00)|((num>>8)&0x00FF); 
     
    7479static uint32_t swapl(libtrace_t *libtrace, uint32_t num) 
    7580{ 
     81        /* to deal with open_dead traces that might try and use this 
     82         * if we don't have any per trace data, assume host byte order 
     83         */ 
     84        if (!DATA(libtrace)) 
     85                return num; 
    7686        if (DATA(libtrace)->header.magic_number == 0xd4c3b2a1) 
    7787                return  
Note: See TracChangeset for help on using the changeset viewer.