Lines Matching defs:info
70 if_register_bpf(struct interface_info *info, int flags)
89 if (ioctl(sock, BIOCSETIF, info->ifp) < 0)
91 info->name, filename);
137 if_register_send(struct interface_info *info)
145 info->wfdesc = if_register_bpf(info, O_WRONLY);
148 if (ioctl(info->wfdesc, BIOCVERSION, &v) < 0)
162 if (ioctl(info->wfdesc, BIOCSETWF, &p) < 0)
165 if (ioctl(info->wfdesc, BIOCLOCK, NULL) < 0)
169 if (caph_rights_limit(info->wfdesc, &rights) < 0)
180 info->ufdesc = sock;
219 if_register_receive(struct interface_info *info)
228 info->rfdesc = if_register_bpf(info, O_RDONLY);
231 if (ioctl(info->rfdesc, BIOCVERSION, &v) < 0)
243 if (ioctl(info->rfdesc, BIOCIMMEDIATE, &flag) < 0)
247 if (ioctl(info->rfdesc, BIOCGBLEN, &sz) < 0)
249 info->rbuf_max = sz;
250 info->rbuf = malloc(info->rbuf_max);
251 if (!info->rbuf)
253 (unsigned long)info->rbuf_max);
254 info->rbuf_offset = 0;
255 info->rbuf_len = 0;
268 if (ioctl(info->rfdesc, BIOCSETF, &p) < 0)
271 if (ioctl(info->rfdesc, BIOCLOCK, NULL) < 0)
275 if (caph_rights_limit(info->rfdesc, &rights) < 0)
277 if (caph_ioctls_limit(info->rfdesc, cmds, 2) < 0)