Lines Matching refs:header
23 #define HEADER(file, test_name) \
54 nss_pheader_t *header = (nss_pheader_t *) buf;
55 header->nsc_callnumber = x0 + NSCD_GETENT;
81 nss_pheader_t *header = (nss_pheader_t *) buf;
82 header->nsc_callnumber = x0 + NSCD_GETENT;
83 header->dbd_off = x0 + sizeof(nss_pheader_t);
84 header->dbd_len = x0 + sizeof(nss_dbd_t);
90 header->key_off = x0 + sizeof(nss_pheader_t) + sizeof(nss_dbd_t);
91 header->key_len = x0 + 1; // one byte past the end of 'buf'
92 header->pbufsiz = x0 + 10000000;
109 if (header->p_status != NSS_SUCCESS) x = -1; else x = -2;
110 if (header->p_herrno != 0) x = -2; else x = -3;
111 if (header->key_off != 0) x = -4; else x = -5;
112 if (header->key_len != 0) x = -6; else x = -7;
113 if (header->data_off != 0) x = -8; else x = -9;
114 if (header->data_len != 0) x = -10; else x = -11;
116 if (header->reserved1 != 0) x = -12; else x = -13;
129 nss_pheader_t *header = (nss_pheader_t *) buf;
130 header->nsc_callnumber = NSCD_SEARCH;
131 header->p_ruid = getuid();
132 header->p_euid = geteuid();
133 header->p_version = NSCD_HEADER_REV;
134 header->p_status = 0;
135 header->p_errno = 0;
136 header->p_herrno = 0;
137 header->libpriv = 0;
138 header->nss_dbop = NSS_DBOP_PROTOCOLS_BYNAME;
142 header->dbd_off = sizeof(nss_pheader_t);
143 header->dbd_len = sizeof(nss_dbd_t) + name_len + 1 + default_config_len + 1;
149 strcpy(buf + header->dbd_off + dbd->o_name, NSS_DBNAM_PROTOCOLS);
150 strcpy(buf + header->dbd_off + dbd->o_default_config,
154 header->key_off = header->dbd_off + ROUND_UP(header->dbd_len, sizeof(nssuint_t));
155 header->key_len = name_len + 1;
156 strcpy(buf + header->key_off, "icmp");
158 header->data_off = header->key_off + ROUND_UP(header->key_len, sizeof(nssuint_t));
159 header->data_len = 0;
160 header->pbufsiz = header->data_off + header->data_len;
163 params.data_size = header->pbufsiz;
169 /* Sanity checks on the nss_pheader_t header. */
170 assert(header->p_version == NSCD_HEADER_REV);
171 assert(header->dbd_off == sizeof(nss_pheader_t));
173 assert((header->dbd_off & 3) == 0);
174 assert((header->key_off & 3) == 0);
175 assert((header->data_off & 3) == 0);
176 assert(header->data_off == params.data_size);
177 nssuint_t l1 = header->key_off - header-> dbd_off;
178 assert(l1 >= header->dbd_len);
179 nssuint_t l2 = header->data_off - header->key_off;
180 assert(l2 >= header->key_len);
181 assert(sizeof(nss_pheader_t) + l1 + l2 == header->data_off);
182 assert(header->data_off + header->data_len == header->pbufsiz);
190 HEADER(stdout, "app_proto_icmp");
191 printf("status=%u\n", header->p_status);
192 printf("errno=%u\n", header->p_errno);
193 printf("herrno=%u\n", header->p_herrno);
194 printf("bufsiz=%" PRIu64 "\n", header->pbufsiz);
196 header->dbd_off, header->dbd_len);
198 header->key_off, header->key_len);
200 header->data_off, header->data_len);
202 header->ext_off, header->ext_len);
203 printf("key=%s\n", buf + header->key_off);
206 char *p = buf + header->data_off;
207 char *limit = p + header->data_len;
259 HEADER(stderr, "app_small_request");
262 HEADER(stderr, "app_uninitialized_request");
265 HEADER(stderr, "app_proto_icmp");