Ver código fonte

* Some constants not defined in OBSD

svn: 1917
Bryan Drewery 21 anos atrás
pai
commit
084972484f
1 arquivos alterados com 19 adições e 0 exclusões
  1. 19 0
      src/compat/dn_expand.c

+ 19 - 0
src/compat/dn_expand.c

@@ -9,6 +9,25 @@
 #include <arpa/inet.h>
 #include <arpa/nameser.h>
 
+/*
+ * Define constants based on RFC 883, RFC 1034, RFC 1035
+ */
+#define NS_PACKETSZ     512     /* maximum packet size */
+#define NS_MAXDNAME     1025    /* maximum domain name */
+#define NS_MAXCDNAME    255     /* maximum compressed domain name */
+#define NS_MAXLABEL     63      /* maximum length of domain label */
+#define NS_HFIXEDSZ     12      /* #/bytes of fixed data in header */
+#define NS_QFIXEDSZ     4       /* #/bytes of fixed data in query */
+#define NS_RRFIXEDSZ    10      /* #/bytes of fixed data in r record */
+#define NS_INT32SZ      4       /* #/bytes of data in a u_int32_t */
+#define NS_INT16SZ      2       /* #/bytes of data in a u_int16_t */
+#define NS_INT8SZ       1       /* #/bytes of data in a u_int8_t */
+#define NS_INADDRSZ     4       /* IPv4 T_A */
+#define NS_IN6ADDRSZ    16      /* IPv6 T_AAAA */
+#define NS_CMPRSFLGS    0xc0    /* Flag bits indicating name compression. */
+#define NS_DEFAULTPORT  53      /* For both TCP and UDP. */
+
+
 static const char       digits[] = "0123456789";
 
 /*