Ignore:
Timestamp:
11/14/06 13:56:01 (15 years ago)
Author:
Perry Lorier <perry@…>
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:
2595c4d
Parents:
35e0869
Message:

Fix lots of little warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/traceanon/traceanon.c

    r66caf4b ra7282fb  
    1212
    1313
    14 void usage(char *argv0)
     14static void usage(char *argv0)
    1515{
    1616        fprintf(stderr,"Usage:\n"
     
    2727
    2828/* Incrementally update a checksum */
    29 void update_in_cksum(uint16_t *csum, uint16_t old, uint16_t new)
     29static void update_in_cksum(uint16_t *csum, uint16_t old, uint16_t new)
    3030{
    3131        uint32_t sum = (~htons(*csum) & 0xFFFF)
     
    3636}
    3737
    38 void update_in_cksum32(uint16_t *csum, uint32_t old, uint32_t new)
    39 {
    40         update_in_cksum(csum,old>>16,new>>16);
    41         update_in_cksum(csum,old&0xFFFF,new&0xFFFF);
     38static void update_in_cksum32(uint16_t *csum, uint32_t old, uint32_t new)
     39{
     40        update_in_cksum(csum,(uint16_t)(old>>16),(uint16_t)(new>>16));
     41        update_in_cksum(csum,(uint16_t)(old&0xFFFF),(uint16_t)(new&0xFFFF));
    4242}
    4343
     
    5252 * source instead of the source and destination!
    5353 */
    54 void encrypt_ips(struct libtrace_ip *ip,bool enc_source,bool enc_dest)
     54static void encrypt_ips(struct libtrace_ip *ip,bool enc_source,bool enc_dest)
    5555{
    5656        struct libtrace_tcp *tcp;
     
    6868                                        ));
    6969                update_in_cksum32(&ip->ip_sum,old_ip,new_ip);
    70                 if (tcp) update_in_cksum(&tcp->check,old_ip,new_ip);
    71                 if (udp) update_in_cksum(&udp->check,old_ip,new_ip);
     70                if (tcp) update_in_cksum32(&tcp->check,old_ip,new_ip);
     71                if (udp) update_in_cksum32(&udp->check,old_ip,new_ip);
    7272                ip->ip_src.s_addr = new_ip;
    7373        }
     
    7979                                        ));
    8080                update_in_cksum32(&ip->ip_sum,old_ip,new_ip);
    81                 if (tcp) update_in_cksum(&tcp->check,old_ip,new_ip);
    82                 if (udp) update_in_cksum(&udp->check,old_ip,new_ip);
     81                if (tcp) update_in_cksum32(&tcp->check,old_ip,new_ip);
     82                if (udp) update_in_cksum32(&udp->check,old_ip,new_ip);
    8383                ip->ip_dst.s_addr = new_ip;
    8484        }
     
    103103{
    104104        enum enc_type_t enc_type = ENC_NONE;
    105         char *key = NULL;
     105        uint8_t *key = NULL;
    106106        struct libtrace_t *trace = 0;
    107107        struct libtrace_packet_t *packet = trace_create_packet();
Note: See TracChangeset for help on using the changeset viewer.