VirtualBox

Changeset 22880 in vbox


Ignore:
Timestamp:
Sep 9, 2009 8:04:03 PM (15 years ago)
Author:
vboxsync
Message:

NAT: warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c

    r22879 r22880  
    110110        {
    111111            uint16_t len;
    112             struct dnsmsg_answer *ans = answers;
     112            struct dnsmsg_answer *ans = (struct dnsmsg_answer *)answers;
    113113            ans->name = htons(off);
    114114            ans->type = htons(5); /*CNAME*/
     
    119119            ans->rdata_len = htons(len);
    120120            ans->rdata[len - 1] = 0;
    121             cstr2qstr(c, ans->rdata);
     121            cstr2qstr(c, (char *)ans->rdata);
    122122            off = (char *)&ans->rdata - (char *)hdr;
    123123            off |= (0x3 << 14);
     
    169169    struct udphdr *udp = NULL;
    170170    union dnsmsg_header *hdr = NULL;
    171     udp = ((char *)pip) + (pip->ip_hl << 2);
     171    udp = (struct udphdr *)((char *)pip) + (pip->ip_hl << 2);
    172172    hdr = (union dnsmsg_header *)&udp[1];
    173173
     
    185185            qw_qname, ntohs(*qw_qtype), ntohs(*qw_qclass));
    186186    }
    187     qstr2cstr(qw_qname, cname);
    188     h = gethostbyname(cname);
     187    qstr2cstr(qw_qname, (char *)cname);
     188    h = gethostbyname((char *)cname);
    189189    fprintf(stderr, "cname:%s\n", cname);
    190190    doanswer(la, hdr, qw_qname, pip, h);
     
    195195    udp->uh_ulen = ntohs(htons(pip->ip_len) - (pip->ip_hl << 2));
    196196    pip->ip_sum = 0;
    197     pip->ip_sum = LibAliasInternetChecksum(la, (char *)pip, pip->ip_hl << 2);
     197    pip->ip_sum = LibAliasInternetChecksum(la, (uint16_t *)pip, pip->ip_hl << 2);
    198198    return (0);
    199199}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette