ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/branches/1.0.x/src/firedns.c
(Generate patch)

Comparing hopm/branches/1.0.x/src/firedns.c (file contents):
Revision 5138 by michael, Thu Dec 25 19:44:15 2014 UTC vs.
Revision 5156 by michael, Fri Dec 26 17:16:15 2014 UTC

# Line 97 | Line 97 | struct s_connection
97      * firedns_add_query()
98      */
99     unsigned char id[2];
100 <   unsigned short class;
101 <   unsigned short type;
100 >   uint16_t class;
101 >   uint16_t type;
102     /* file descriptor returned from sockets */
103     int fd;
104     void *info;
# Line 111 | Line 111 | struct s_connection
111  
112   struct s_rr_middle
113   {
114 <   unsigned short type;
115 <   unsigned short class;
114 >   uint16_t type;
115 >   uint16_t class;
116     /* XXX - firedns depends on this being 4 bytes */
117     uint32 ttl;
118 <   unsigned short rdlength;
118 >   uint16_t rdlength;
119   };
120  
121   /* DNS query header */
# Line 135 | Line 135 | struct s_header
135   #define FLAGS2_MASK_Z  0x70
136   #define FLAGS2_MASK_RCODE 0x0f
137  
138 <   unsigned short qdcount;
139 <   unsigned short ancount;
140 <   unsigned short nscount;
141 <   unsigned short arcount;
138 >   uint16_t qdcount;
139 >   uint16_t ancount;
140 >   uint16_t nscount;
141 >   uint16_t arcount;
142     /* DNS question, populated by firedns_build_query_payload() */
143     unsigned char payload[512];
144   };
# Line 148 | Line 148 | struct s_header
148   static struct s_connection *firedns_add_query(void);
149   static int firedns_doquery(struct s_connection *s);
150   static int firedns_build_query_payload(const char * const name,
151 <      unsigned short rr, unsigned short class, unsigned char * payload);
151 >      uint16_t, uint16_t, unsigned char * payload);
152   static int firedns_send_requests(struct s_header *h, struct s_connection *s,
153        int l);
154  
# Line 386 | Line 386 | static int firedns_doquery(struct s_conn
386   * populate payload with query: name= question, rr= record type
387   */
388   static int firedns_build_query_payload(const char * const name,
389 <      unsigned short rr, unsigned short class, unsigned char * payload)
389 >      uint16_t rr, uint16_t class, unsigned char * payload)
390   {
391 <   short payloadpos;
391 >   int16_t payloadpos;
392     const char * tempchr, * tempchr2;
393 <   unsigned short l;
393 >   uint16_t l;
394  
395     payloadpos = 0;
396     tempchr2 = name;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines