Commit Diff
Diff:
72ce841dc1b0ce2fb9b6e1b2ce084c4a9e29e9d4
7202f80f7c0dd3d8f3b5e4f79afe3c78953c902b
Commit:
7202f80f7c0dd3d8f3b5e4f79afe3c78953c902b
Tree:
3c18cb9b7654a3ec549ccb9da5fffe8b3b7c16ed
Author:
pbug <pbug@delphinusdns.org>
Committer:
pbug <pbug@delphinusdns.org>
Date:
Sat Jul 12 21:20:08 2008 UTC
Message:
* some explanation about fields in struct domain, only comments
blob - cd857506fc9c7487b731d38c1f3b1f6c5510bb4b
blob + a1bb11140e8bdae9af123434e8d91d287dd8733e
--- db.h
+++ db.h
@@ -48,14 +48,14 @@ struct soa {
} __attribute__((packed));
struct smx {
- u_int16_t preference;
- char exchange[DNS_MAXNAME];
- u_int8_t exchangelen;
+ u_int16_t preference; /* MX preference */
+ char exchange[DNS_MAXNAME]; /* name of exchange server */
+ u_int8_t exchangelen; /* length of exchange server name */
} __attribute__((packed));
struct ns {
- char nsserver[DNS_MAXNAME];
- u_int8_t nslen;
+ char nsserver[DNS_MAXNAME]; /* NS name */
+ u_int8_t nslen; /* length of NS */
} __attribute__((packed));
struct domain {
@@ -69,24 +69,24 @@ struct domain {
#define DOMAIN_HAVE_MX 0x10
#define DOMAIN_HAVE_AAAA 0x20
#define DOMAIN_HAVE_NS 0x40
- struct soa soa;
- u_int32_t ttl;
- in_addr_t a[10];
- int a_count;
- int a_ptr;
- struct in6_addr aaaa[10];
- int aaaa_count;
- int aaaa_ptr;
- struct smx mx[10];
- int mx_count;
- int mx_ptr;
- struct ns ns[10];
- int ns_count;
- int ns_ptr;
- char cname[DNS_MAXNAME];
- u_int8_t cnamelen;
- char ptr[DNS_MAXNAME];
- u_int8_t ptrlen;
+ struct soa soa; /* start of authority */
+ u_int32_t ttl; /* time to live */
+ in_addr_t a[10]; /* IP addresses */
+ int a_count; /* IP address count (max 10) */
+ int a_ptr; /* pointer to last used address */
+ struct in6_addr aaaa[10]; /* IPv6 addresses */
+ int aaaa_count; /* IPv6 address count (max 10) */
+ int aaaa_ptr; /* pointer to last used IPv6 address */
+ struct smx mx[10]; /* MX addresses */
+ int mx_count; /* MX address count, max 10 */
+ int mx_ptr; /* pointer to last used MX adddress */
+ struct ns ns[10]; /* NS resource records (max 10) */
+ int ns_count; /* count of NS records, (max 10) */
+ int ns_ptr; /* pointer to last used NS address */
+ char cname[DNS_MAXNAME]; /* CNAME RR */
+ u_int8_t cnamelen; /* len of CNAME */
+ char ptr[DNS_MAXNAME]; /* PTR RR */
+ u_int8_t ptrlen; /* len of PTR */
} __attribute__((packed));
struct sreply {
repomaster@centroid.eu