modified: myjupyterlab.sh
[GalaxyCodeBases.git] / etc / Windows / vlmcsd_old_vancepym / ns_parse.h
blob7bf4b6aa8c129830b63dd79acdbd2911eee400dd
2 #ifndef NS_PARSE_H_
3 #define NS_PARSE_H_
5 #ifndef NS_INT16SZ
6 #define NS_INT16SZ (sizeof(uint16_t))
7 #endif // NS_INT16SZ
9 #ifndef NS_INT32SZ
10 #define NS_INT32SZ (sizeof(uint32_t))
11 #endif // NS_INT32SZ
13 #ifndef NS_MAXDNAME
14 #define NS_MAXDNAME 1025
15 #endif
17 #define ns_msg_id_vlmcsd(handle) ((handle)._id + 0)
18 #define ns_msg_base_vlmcsd(handle) ((handle)._msg + 0)
19 #define ns_msg_end_vlmcsd(handle) ((handle)._eom + 0)
20 #define ns_msg_size_vlmcsd(handle) ((handle)._eom - (handle)._msg)
21 #define ns_msg_count_vlmcsd(handle, section) ((handle)._counts[section] + 0)
23 #define ns_rr_name_vlmcsd(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
24 #define ns_rr_type_vlmcsd(rr) ((ns_type)((rr).type + 0))
25 #define ns_rr_class_vlmcsd(rr) ((ns_class)((rr).rr_class + 0))
26 #define ns_rr_ttl_vlmcsd(rr) ((rr).ttl + 0)
27 #define ns_rr_rdlen_vlmcsd(rr) ((rr).rdlength + 0)
28 #define ns_rr_rdata_vlmcsd(rr) ((rr).rdata + 0)
30 #define ns_msg_id_vlmcsd(handle) ((handle)._id + 0)
31 #define ns_msg_base_vlmcsd(handle) ((handle)._msg + 0)
32 #define ns_msg_end_vlmcsd(handle) ((handle)._eom + 0)
33 #define ns_msg_size_vlmcsd(handle) ((handle)._eom - (handle)._msg)
34 #define ns_msg_count_vlmcsd(handle, section) ((handle)._counts[section] + 0)
37 typedef enum __ns_sect_vlmcsd {
38 ns_s_qd_vlmcsd = 0, /*%< Query: Question. */
39 ns_s_zn_vlmcsd = 0, /*%< Update: Zone. */
40 ns_s_an_vlmcsd = 1, /*%< Query: Answer. */
41 ns_s_pr_vlmcsd = 1, /*%< Update: Prerequisites. */
42 ns_s_ns_vlmcsd = 2, /*%< Query: Name servers. */
43 ns_s_ud_vlmcsd = 2, /*%< Update: Update. */
44 ns_s_ar_vlmcsd = 3, /*%< Query|Update: Additional records. */
45 ns_s_max_vlmcsd = 4
46 } ns_sect_vlmcsd;
48 typedef struct __ns_msg_vlmcsd {
49 const uint8_t *_msg, *_eom;
50 uint16_t _id, _flags, _counts[ns_s_max_vlmcsd];
51 const uint8_t *_sections[ns_s_max_vlmcsd];
52 ns_sect_vlmcsd _sect;
53 int _rrnum;
54 const uint8_t *_msg_ptr;
55 } ns_msg_vlmcsd;
58 typedef struct __ns_rr_vlmcsd {
59 char name[NS_MAXDNAME];
60 uint16_t type;
61 uint16_t rr_class;
62 uint32_t ttl;
63 uint16_t rdlength;
64 const uint8_t * rdata;
65 } ns_rr_vlmcsd;
67 int ns_initparse_vlmcsd(const uint8_t *msg, int msglen, ns_msg_vlmcsd *handle);
69 int ns_parserr_vlmcsd(ns_msg_vlmcsd *handle, ns_sect_vlmcsd section, int rrnum, ns_rr_vlmcsd *rr);
73 #endif /* NS_PARSE_H_ */