diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-04-06 07:46:10 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-04-06 07:46:10 +0000 |
commit | c013ea31649c63804599cc16253fa34d160e818d (patch) | |
tree | b430d10a7324a727626c4e04f5a7fd3ef03b3246 /src/vpn | |
parent | 5906405838be2ab68bece4b4b07688dbe97ae5f3 (diff) | |
download | gnunet-c013ea31649c63804599cc16253fa34d160e818d.tar.gz gnunet-c013ea31649c63804599cc16253fa34d160e818d.zip |
going less bitfield crazy
Diffstat (limited to 'src/vpn')
-rw-r--r-- | src/vpn/gnunet-service-dns.c | 12 | ||||
-rw-r--r-- | src/vpn/gnunet-vpn-packet.h | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index 944b7ed46..d4ef371e7 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c | |||
@@ -75,7 +75,7 @@ static struct answer_packet_list *head; | |||
75 | static struct answer_packet_list *tail; | 75 | static struct answer_packet_list *tail; |
76 | 76 | ||
77 | /** | 77 | /** |
78 | * A structure containing a mapping from network-byte-ordered DNS-id to | 78 | * A structure containing a mapping from network-byte-ordered DNS-id (16 bit) to |
79 | * some information needed to handle this query | 79 | * some information needed to handle this query |
80 | * | 80 | * |
81 | * It currently allocates at least | 81 | * It currently allocates at least |
@@ -86,12 +86,12 @@ static struct answer_packet_list *tail; | |||
86 | static struct { | 86 | static struct { |
87 | unsigned valid:1; | 87 | unsigned valid:1; |
88 | struct GNUNET_SERVER_Client* client; | 88 | struct GNUNET_SERVER_Client* client; |
89 | unsigned local_ip:32; | 89 | uint32_t local_ip; |
90 | unsigned remote_ip:32; | 90 | uint32_t remote_ip; |
91 | unsigned local_port:16; | 91 | uint16_t local_port; |
92 | char* name; | 92 | char* name; |
93 | unsigned namelen:8; | 93 | uint8_t namelen; |
94 | } query_states[65536]; | 94 | } query_states[UINT16_MAX]; |
95 | 95 | ||
96 | /** | 96 | /** |
97 | * A struct used to give more than one value as | 97 | * A struct used to give more than one value as |
diff --git a/src/vpn/gnunet-vpn-packet.h b/src/vpn/gnunet-vpn-packet.h index 51cf4c4e8..87b12cb69 100644 --- a/src/vpn/gnunet-vpn-packet.h +++ b/src/vpn/gnunet-vpn-packet.h | |||
@@ -71,7 +71,7 @@ struct icmp_hdr { | |||
71 | 71 | ||
72 | // DNS-Stuff | 72 | // DNS-Stuff |
73 | struct dns_static { | 73 | struct dns_static { |
74 | unsigned short id GNUNET_PACKED; | 74 | uint16_t id GNUNET_PACKED; |
75 | 75 | ||
76 | unsigned rd:1 GNUNET_PACKED; // recursion desired (client -> server) | 76 | unsigned rd:1 GNUNET_PACKED; // recursion desired (client -> server) |
77 | unsigned tc:1 GNUNET_PACKED; // message is truncated | 77 | unsigned tc:1 GNUNET_PACKED; // message is truncated |
@@ -88,10 +88,10 @@ struct dns_static { | |||
88 | unsigned z:3 GNUNET_PACKED; // reserved | 88 | unsigned z:3 GNUNET_PACKED; // reserved |
89 | unsigned ra:1 GNUNET_PACKED; // recursion available (server -> client) | 89 | unsigned ra:1 GNUNET_PACKED; // recursion available (server -> client) |
90 | 90 | ||
91 | unsigned short qdcount GNUNET_PACKED; // number of questions | 91 | uint16_t qdcount GNUNET_PACKED; // number of questions |
92 | unsigned short ancount GNUNET_PACKED; // number of answers | 92 | uint16_t ancount GNUNET_PACKED; // number of answers |
93 | unsigned short nscount GNUNET_PACKED; // number of authority-records | 93 | uint16_t nscount GNUNET_PACKED; // number of authority-records |
94 | unsigned short arcount GNUNET_PACKED; // number of additional records | 94 | uint16_t arcount GNUNET_PACKED; // number of additional records |
95 | }; | 95 | }; |
96 | 96 | ||
97 | struct dns_pkt { | 97 | struct dns_pkt { |