Lines Matching refs:hdr
187 struct iapp_hdr *hdr;
194 hdr = (struct iapp_hdr *) buf;
195 hdr->version = IAPP_VERSION;
196 hdr->command = IAPP_CMD_ADD_notify;
197 hdr->identifier = host_to_be16(iapp->identifier++);
198 hdr->length = host_to_be16(sizeof(*hdr) + sizeof(*add));
200 add = (struct iapp_add_notify *) (hdr + 1);
279 struct iapp_hdr *hdr, int len)
281 struct iapp_add_notify *add = (struct iapp_add_notify *) (hdr + 1);
327 struct iapp_hdr *hdr;
346 len < (int) sizeof(*hdr) ? " (too short)" : "");
348 if (len < (int) sizeof(*hdr))
351 hdr = (struct iapp_hdr *) buf;
352 hlen = be_to_host16(hdr->length);
356 hdr->version, hdr->command,
357 be_to_host16(hdr->identifier), hlen);
358 if (hdr->version != IAPP_VERSION) {
360 hdr->version);
373 switch (hdr->command) {
375 iapp_process_add_notify(iapp, &from, hdr, hlen - sizeof(*hdr));
385 printf("Unknown IAPP command %d\n", hdr->command);