Changeset 22880 in vbox
- Timestamp:
- Sep 9, 2009 8:04:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c
r22879 r22880 110 110 { 111 111 uint16_t len; 112 struct dnsmsg_answer *ans = answers;112 struct dnsmsg_answer *ans = (struct dnsmsg_answer *)answers; 113 113 ans->name = htons(off); 114 114 ans->type = htons(5); /*CNAME*/ … … 119 119 ans->rdata_len = htons(len); 120 120 ans->rdata[len - 1] = 0; 121 cstr2qstr(c, ans->rdata);121 cstr2qstr(c, (char *)ans->rdata); 122 122 off = (char *)&ans->rdata - (char *)hdr; 123 123 off |= (0x3 << 14); … … 169 169 struct udphdr *udp = NULL; 170 170 union dnsmsg_header *hdr = NULL; 171 udp = ( (char *)pip) + (pip->ip_hl << 2);171 udp = (struct udphdr *)((char *)pip) + (pip->ip_hl << 2); 172 172 hdr = (union dnsmsg_header *)&udp[1]; 173 173 … … 185 185 qw_qname, ntohs(*qw_qtype), ntohs(*qw_qclass)); 186 186 } 187 qstr2cstr(qw_qname, cname);188 h = gethostbyname( cname);187 qstr2cstr(qw_qname, (char *)cname); 188 h = gethostbyname((char *)cname); 189 189 fprintf(stderr, "cname:%s\n", cname); 190 190 doanswer(la, hdr, qw_qname, pip, h); … … 195 195 udp->uh_ulen = ntohs(htons(pip->ip_len) - (pip->ip_hl << 2)); 196 196 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); 198 198 return (0); 199 199 }
Note:
See TracChangeset
for help on using the changeset viewer.