ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/irc_res.h
(Generate patch)

Comparing ircd-hybrid/trunk/include/irc_res.h (file contents):
Revision 2934 by michael, Sat Oct 27 21:02:32 2012 UTC vs.
Revision 2935 by michael, Sun Jan 26 11:16:40 2014 UTC

# Line 1 | Line 1
1   /*
2 < * include/irc_res.h for referencing functions in src/irc_res.c
2 > *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < * $Id$
4 > *  Copyright (c) 1997-2014 ircd-hybrid development team
5 > *
6 > *  This program is free software; you can redistribute it and/or modify
7 > *  it under the terms of the GNU General Public License as published by
8 > *  the Free Software Foundation; either version 2 of the License, or
9 > *  (at your option) any later version.
10 > *
11 > *  This program is distributed in the hope that it will be useful,
12 > *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 > *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 > *  GNU General Public License for more details.
15 > *
16 > *  You should have received a copy of the GNU General Public License
17 > *  along with this program; if not, write to the Free Software
18 > *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
19 > *  USA
20 > */
21 >
22 > /*! \file irc_res.h
23 > * \brief ircd resolver functions
24 > * \version $Id$
25   */
26  
27   #ifndef INCLUDED_irc_res_h
# Line 15 | Line 35 | struct Client; /* XXX */
35   #define NS_NOTIFY_OP 4
36   #define NS_INT16SZ 2
37   #define NS_IN6ADDRSZ    16
38 < #define NS_INADDRSZ      4
38 > #define NS_INADDRSZ     4
39   #define NS_INT32SZ 4
40   #define NS_CMPRSFLGS    0xc0
41   #define NS_MAXCDNAME 255
# Line 35 | Line 55 | struct Client; /* XXX */
55   #define HFIXEDSZ 12
56  
57  
38
58   typedef struct
59   {
60 <        unsigned        id :16;         /* query identification number */
60 >  unsigned  id :16;     /* query identification number */
61   #ifdef WORDS_BIGENDIAN
62 <                        /* fields in third byte */
63 <        unsigned        qr: 1;          /* response flag */
64 <        unsigned        opcode: 4;      /* purpose of message */
65 <        unsigned        aa: 1;          /* authoritive answer */
66 <        unsigned        tc: 1;          /* truncated message */
67 <        unsigned        rd: 1;          /* recursion desired */
68 <                        /* fields in fourth byte */
69 <        unsigned        ra: 1;          /* recursion available */
70 <        unsigned        unused :1;      /* unused bits (MBZ as of 4.9.3a3) */
71 <        unsigned        ad: 1;          /* authentic data from named */
72 <        unsigned        cd: 1;          /* checking disabled by resolver */
73 <        unsigned        rcode :4;       /* response code */
62 >  /* fields in third byte */
63 >  unsigned  qr: 1;      /* response flag */
64 >  unsigned  opcode: 4;  /* purpose of message */
65 >  unsigned  aa: 1;      /* authoritive answer */
66 >  unsigned  tc: 1;      /* truncated message */
67 >  unsigned  rd: 1;      /* recursion desired */
68 >
69 >  /* fields in fourth byte */
70 >  unsigned  ra: 1;      /* recursion available */
71 >  unsigned  unused :1;  /* unused bits (MBZ as of 4.9.3a3) */
72 >  unsigned  ad: 1;      /* authentic data from named */
73 >  unsigned  cd: 1;      /* checking disabled by resolver */
74 >  unsigned  rcode :4;   /* response code */
75   #else
76 <                        /* fields in third byte */
77 <        unsigned        rd :1;          /* recursion desired */
78 <        unsigned        tc :1;          /* truncated message */
79 <        unsigned        aa :1;          /* authoritive answer */
80 <        unsigned        opcode :4;      /* purpose of message */
81 <        unsigned        qr :1;          /* response flag */
82 <                        /* fields in fourth byte */
83 <        unsigned        rcode :4;       /* response code */
84 <        unsigned        cd: 1;          /* checking disabled by resolver */
85 <        unsigned        ad: 1;          /* authentic data from named */
86 <        unsigned        unused :1;      /* unused bits (MBZ as of 4.9.3a3) */
87 <        unsigned        ra :1;          /* recursion available */
76 >  /* fields in third byte */
77 >  unsigned  rd :1;      /* recursion desired */
78 >  unsigned  tc :1;      /* truncated message */
79 >  unsigned  aa :1;      /* authoritive answer */
80 >  unsigned  opcode :4;  /* purpose of message */
81 >  unsigned  qr :1;      /* response flag */
82 >
83 >  /* fields in fourth byte */
84 >  unsigned  rcode :4;   /* response code */
85 >  unsigned  cd: 1;      /* checking disabled by resolver */
86 >  unsigned  ad: 1;      /* authentic data from named */
87 >  unsigned  unused :1;  /* unused bits (MBZ as of 4.9.3a3) */
88 >  unsigned  ra :1;      /* recursion available */
89   #endif
90 <                        /* remaining bytes */
91 <        unsigned        qdcount :16;    /* number of question entries */
92 <        unsigned        ancount :16;    /* number of answer entries */
93 <        unsigned        nscount :16;    /* number of authority entries */
94 <        unsigned        arcount :16;    /* number of resource entries */
90 >  /* remaining bytes */
91 >  unsigned  qdcount :16; /* number of question entries */
92 >  unsigned  ancount :16; /* number of answer entries */
93 >  unsigned  nscount :16; /* number of authority entries */
94 >  unsigned  arcount :16; /* number of resource entries */
95   } HEADER;
96  
97   typedef void (*dns_callback_fnc)(void *, const struct irc_ssaddr *, const char *);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)