Home
last modified time | relevance | path

Searched refs:ifd (Results 1 – 25 of 68) sorted by relevance

123

/freebsd/sys/net/altq/
H A Daltq_rmclass.c65 #define reset_cutoff(ifd) { ifd->cutoff_ = RM_MAXDEPTH; } argument
179 rmc_newclass(int pri, struct rm_ifdat *ifd, u_int nsecPerByte, in rmc_newclass() argument
232 cl->ifdat_ = ifd; in rmc_newclass()
310 IFQ_LOCK(ifd->ifq_); in rmc_newclass()
311 if ((peer = ifd->active_[pri]) != NULL) { in rmc_newclass()
314 while (peer->peer_ != ifd->active_[pri]) in rmc_newclass()
318 ifd->active_[pri] = cl; in rmc_newclass()
337 if (ifd->wrr_) { in rmc_newclass()
338 ifd->num_[pri]++; in rmc_newclass()
339 ifd->alloc_[pri] += cl->allotment_; in rmc_newclass()
[all …]
/freebsd/usr.sbin/bsnmpd/modules/snmp_bridge/
H A Dbridge_sys.c136 struct ifdrv ifd; in bridge_get_conf_param() local
139 strlcpy(ifd.ifd_name, bif->bif_name, IFNAMSIZ); in bridge_get_conf_param()
140 ifd.ifd_len = sizeof(b_param); in bridge_get_conf_param()
141 ifd.ifd_data = &b_param; in bridge_get_conf_param()
144 ifd.ifd_cmd = BRDGGPRI; in bridge_get_conf_param()
145 if (ioctl(sock, SIOCGDRVSPEC, &ifd) < 0) { in bridge_get_conf_param()
154 ifd.ifd_cmd = BRDGGMA; in bridge_get_conf_param()
155 if (ioctl(sock, SIOCGDRVSPEC, &ifd) < 0) { in bridge_get_conf_param()
165 ifd.ifd_cmd = BRDGGHT; in bridge_get_conf_param()
166 if (ioctl(sock, SIOCGDRVSPEC, &ifd) < 0) { in bridge_get_conf_param()
[all …]
/freebsd/sys/net/
H A Dif_clone.c114 struct ifc_data_nl *ifd);
197 ifc_create_ifp(const char *name, struct ifc_data *ifd, struct ifnet **ifpp) in ifc_create_ifp() argument
205 .flags = ifd->flags, in ifc_create_ifp()
206 .unit = ifd->unit, in ifc_create_ifp()
207 .params = ifd->params, in ifc_create_ifp()
219 ifc_create_ifp_nl(const char *name, struct ifc_data_nl *ifd) in ifc_create_ifp_nl() argument
223 ifd->error = EINVAL; in ifc_create_ifp_nl()
227 ifd->error = if_clone_createif_nl(ifc, name, ifd); in ifc_create_ifp_nl()
235 struct ifc_data ifd in if_clone_create() local
247 ifc_modify_ifp_nl(struct ifnet * ifp,struct ifc_data_nl * ifd) ifc_modify_ifp_nl() argument
272 ifc_create_ifp_nl_default(struct if_clone * ifc,char * name,size_t len,struct ifc_data_nl * ifd) ifc_create_ifp_nl_default() argument
284 ifc_modify_ifp_nl_default(struct ifnet * ifp,struct ifc_data_nl * ifd) ifc_modify_ifp_nl_default() argument
384 if_clone_createif_nl(struct if_clone * ifc,const char * ifname,struct ifc_data_nl * ifd) if_clone_createif_nl() argument
647 struct ifc_data_nl ifd = {}; if_clone_simple() local
942 ifc_copyin(const struct ifc_data * ifd,void * target,size_t len) ifc_copyin() argument
[all...]
H A Dif_clone.h53 struct ifc_data *ifd, struct ifnet **ifpp);
72 struct ifc_data_nl *ifd);
73 typedef int ifc_modify_nl_f(struct ifnet *ifp, struct ifc_data_nl *ifd);
112 int ifc_create_ifp(const char *name, struct ifc_data *ifd, struct ifnet **ifpp);
114 bool ifc_create_ifp_nl(const char *name, struct ifc_data_nl *ifd);
115 bool ifc_modify_ifp_nl(struct ifnet *ifp, struct ifc_data_nl *ifd);
121 int ifc_copyin(const struct ifc_data *ifd, void *target, size_t len);
H A Dif_stf.c243 struct ifc_data *ifd, struct ifnet **ifpp) in stf_clone_create() argument
940 struct ifdrv *ifd; in stf_ioctl() local
952 ifd = (struct ifdrv *)data; in stf_ioctl()
956 if (ifd->ifd_cmd == STF6RD_SV4NET) { in stf_ioctl()
957 if (ifd->ifd_len != sizeof(args)) { in stf_ioctl()
962 error = copyin(ifd->ifd_data, &args, ifd->ifd_len); in stf_ioctl()
976 } else if (ifd->ifd_cmd == STF6RD_SBR) { in stf_ioctl()
977 if (ifd->ifd_len != sizeof(args)) { in stf_ioctl()
982 error = copyin(ifd->ifd_data, &args, ifd->ifd_len); in stf_ioctl()
992 ifd = (struct ifdrv *)data; in stf_ioctl()
[all …]
/freebsd/contrib/smbfs/lib/smb/
H A Dnb_net.c105 struct nb_ifdesc *ifd; in nb_enum_if() local
123 if (strlen(p->ifa_name) >= sizeof(ifd->id_name)) in nb_enum_if()
126 ifd = malloc(sizeof(struct nb_ifdesc)); in nb_enum_if()
127 if (ifd == NULL) { in nb_enum_if()
132 bzero(ifd, sizeof(struct nb_ifdesc)); in nb_enum_if()
133 strcpy(ifd->id_name, p->ifa_name); in nb_enum_if()
134 ifd->id_flags = p->ifa_flags; in nb_enum_if()
135 ifd->id_addr = ((struct sockaddr_in *)p->ifa_addr)->sin_addr; in nb_enum_if()
136 ifd->id_mask = ((struct sockaddr_in *)p->ifa_netmask)->sin_addr; in nb_enum_if()
137 ifd->id_next = *iflist; in nb_enum_if()
[all …]
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/
H A Dstride_dd.c198 read_entire_file(int ifd, int ofd, void *buf) in read_entire_file() argument
203 c = read(ifd, buf, bsize); in read_entire_file()
216 if (lseek(ifd, (stride - 1) * bsize, SEEK_CUR) == -1) { in read_entire_file()
229 read_on_count(int ifd, int ofd, void *buf) in read_on_count() argument
235 c = read(ifd, buf, bsize); in read_on_count()
262 if (lseek(ifd, (stride - 1) * bsize, SEEK_CUR) == -1) { in read_on_count()
277 int ifd; in main() local
291 ifd = open(ifile, ifd_flags); in main()
292 if (ifd == -1) { in main()
318 if (lseek(ifd, skipamt, SEEK_CUR) == -1) { in main()
[all …]
/freebsd/contrib/openpam/lib/libpam/
H A Dopenpam_ttyconv.c82 prompt_tty(int ifd, int ofd, const char *message, char *response, int echo) in prompt_tty() argument
98 if (tcgetattr(ifd, &tcattr) != 0) { in prompt_tty()
104 if (tcsetattr(ifd, TCSAFLUSH, &tcattr) != 0) { in prompt_tty()
143 pfd.fd = ifd; in prompt_tty()
168 if ((ret = read(ifd, &ch, 1)) < 0) { in prompt_tty()
185 if (tcsetattr(ifd, 0, &tcattr) != 0) { in prompt_tty()
289 int ifd, ofd, ret; in prompt() local
296 ifd = STDIN_FILENO; in prompt()
299 if ((ifd = open("/dev/tty", O_RDWR)) < 0) in prompt()
302 ofd = ifd; in prompt()
[all …]
/freebsd/lib/libopenbsd/
H A Dimsg.c58 struct imsg_fd *ifd; in imsg_read() local
70 if ((ifd = calloc(1, sizeof(struct imsg_fd))) == NULL) in imsg_read()
78 free(ifd); in imsg_read()
106 if (ifd != NULL) { in imsg_read()
107 ifd->fd = fd; in imsg_read()
108 TAILQ_INSERT_TAIL(&ibuf->fds, ifd, in imsg_read()
110 ifd = NULL; in imsg_read()
119 free(ifd); in imsg_read()
273 struct imsg_fd *ifd; in imsg_get_fd() local
275 if ((ifd = TAILQ_FIRST(&ibuf->fds)) == NULL) in imsg_get_fd()
[all …]
/freebsd/sbin/ifconfig/
H A Difstf.c57 struct ifdrv ifd = {}; in do_cmd() local
59 strlcpy(ifd.ifd_name, ctx->ifname, sizeof(ifd.ifd_name)); in do_cmd()
60 ifd.ifd_cmd = op; in do_cmd()
61 ifd.ifd_len = argsize; in do_cmd()
62 ifd.ifd_data = arg; in do_cmd()
64 return (ioctl_ctx(ctx, set ? SIOCSDRVSPEC : SIOCGDRVSPEC, &ifd)); in do_cmd()
/freebsd/lib/libifconfig/
H A Dlibifconfig_bridge.c52 struct ifdrv ifd = { 0 }; in ifconfig_bridge_ioctlwrap() local
55 strlcpy(ifd.ifd_name, name, sizeof(ifd.ifd_name)); in ifconfig_bridge_ioctlwrap()
56 ifd.ifd_cmd = cmd; in ifconfig_bridge_ioctlwrap()
57 ifd.ifd_data = arg; in ifconfig_bridge_ioctlwrap()
58 ifd.ifd_len = arglen; in ifconfig_bridge_ioctlwrap()
60 return (ifconfig_ioctlwrap(h, AF_LOCAL, req, &ifd)); in ifconfig_bridge_ioctlwrap()
/freebsd/lib/libusb/
H A Dlibusb10_desc.c103 struct libusb_interface_descriptor *ifd; in libusb_get_config_descriptor() local
176 ifd = (libusb_interface_descriptor *) (pconfd->interface + nif); in libusb_get_config_descriptor()
177 endd = (libusb_endpoint_descriptor *) (ifd + nalt); in libusb_get_config_descriptor()
201 pconfd->interface[i].altsetting = ifd; in libusb_get_config_descriptor()
202 ifd->endpoint = endd; in libusb_get_config_descriptor()
204 ifd++; in libusb_get_config_descriptor()
207 ifd->endpoint = endd; in libusb_get_config_descriptor()
209 ifd++; in libusb_get_config_descriptor()
221 ifd = &pconfd->interface[i].altsetting[j]; in libusb_get_config_descriptor()
222 ifd->bLength = pinf->desc.bLength; in libusb_get_config_descriptor()
[all …]
/freebsd/contrib/mandoc/
H A Ddbm_map.c51 static int ifd; variable
65 if ((ifd = open(fname, O_RDONLY)) == -1) in dbm_map()
67 if (fstat(ifd, &st) == -1) in dbm_map()
79 ifd, 0)) == MAP_FAILED) in dbm_map()
122 close(ifd); in dbm_map()
132 if (close(ifd) == -1) in dbm_unmap()
/freebsd/contrib/elftoolchain/libelftc/
H A Delftc_copyfile.c48 elftc_copyfile(int ifd, int ofd) in elftc_copyfile() argument
57 if (fstat(ifd, &sb) < 0) in elftc_copyfile()
72 buf = mmap(NULL, file_size, PROT_READ, MAP_SHARED, ifd, (off_t) 0); in elftc_copyfile()
88 if ((nr = read(ifd, b, n)) < 0) { in elftc_copyfile()
/freebsd/tools/tools/intel-ucode-split/
H A Dintel-ucode-split.c124 int c, ifd, ofd; in main() local
146 ifd = open(argv[0], O_RDONLY); in main()
147 if (ifd < 0) in main()
156 rv = read(ifd, &hdr, sizeof(hdr)); in main()
176 if (lseek(ifd, resid, SEEK_CUR) == -1) in main()
199 rv = read(ifd, buf, len); in main()
/freebsd/usr.bin/split/
H A Dsplit.c59 static int ifd = -1, ofd = -1; /* Input/output file descriptors. */ variable
160 ifd = STDIN_FILENO; in main()
161 else if ((ifd = open(*argv, O_RDONLY, 0)) < 0) in main()
190 if (ifd == -1) /* Stdin by default. */ in main()
191 ifd = 0; in main()
222 switch ((len = read(ifd, bfr, sizeof(bfr)))) { in split1()
285 if ((infp = fdopen(ifd, "r")) == NULL) in split2()
328 if (fstat(ifd, &sb) == -1) { in split3()
/freebsd/share/examples/ipfilter/samples/
H A Drelay.c30 int relay(ifd, ofd, rfd) in relay() argument
31 int ifd, ofd, rfd; in relay()
40 nfd = ifd;
52 FD_SET(ifd, &rfds);
64 if (FD_ISSET(ifd, &rfds)) {
65 rw = read(ifd, irh, ibuff + RELAY_BUFSZ - irh);
/freebsd/usr.bin/ar/
H A Dacpyacc.y61 static int arscp_copy(int ifd, int ofd);
272 int ifd, ofd; in arscp_create() local
292 if ((ifd = open(in, O_RDONLY)) < 0) { in arscp_create()
296 if (arscp_copy(ifd, ofd)) { in arscp_create()
300 close(ifd); in arscp_create()
325 arscp_copy(int ifd, int ofd) in arscp_copy() argument
332 if (fstat(ifd, &sb) < 0) { in arscp_copy()
336 if ((p = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, ifd, in arscp_copy()
/freebsd/sys/netpfil/pf/
H A Dif_pflog.c120 struct ifc_data ifd = { .unit = 0 }; in pflogattach() local
121 ifc_create_ifp(pflogname, &ifd, NULL); in pflogattach()
126 struct ifc_data *ifd, struct ifnet **ifpp) in pflog_clone_create() argument
130 MPASS(ifd->unit < PFLOGIFS_MAX); in pflog_clone_create()
133 if_initname(ifp, pflogname, ifd->unit); in pflog_clone_create()
144 V_pflogifs[ifd->unit] = ifp; in pflog_clone_create()
/freebsd/sys/dev/ofw/
H A Dofw_disk.c140 ihandle_t ifd; in g_ofwd_init() local
154 ifd = OF_open(path); in g_ofwd_init()
155 if (ifd == -1) { in g_ofwd_init()
164 sc->ofwd_instance = ifd; in g_ofwd_init()
/freebsd/usr.sbin/arp/
H A Darp.c828 struct ifaddrs *ifa, *ifd, *ifas = NULL; in get_ether_addr() local
870 for (ifd = ifas; ifd != NULL; ifd = ifd->ifa_next) { in get_ether_addr()
871 if (ifd->ifa_addr == NULL) in get_ether_addr()
873 if (strcmp(ifa->ifa_name, ifd->ifa_name) == 0 && in get_ether_addr()
874 ifd->ifa_addr->sa_family == AF_LINK) in get_ether_addr()
877 if (ifd == NULL) in get_ether_addr()
882 dla = (struct sockaddr_dl *)ifd->ifa_addr; in get_ether_addr()
/freebsd/contrib/elftoolchain/elfcopy/
H A Dbinary.c47 create_binary(int ifd, int ofd) in create_binary() argument
57 if ((e = elf_begin(ifd, ELF_C_READ, NULL)) == NULL) in create_binary()
139 create_elf_from_binary(struct elfcopy *ecp, int ifd, const char *ifn) in create_elf_from_binary() argument
157 if (fstat(ifd, &sb) == -1) in create_elf_from_binary()
163 if (read(ifd, content, sb.st_size) != sb.st_size) in create_elf_from_binary()
H A Darchive.c51 static void ac_read_objs(struct elfcopy *ecp, int ifd);
357 ac_detect_ar(int ifd) in ac_detect_ar() argument
367 if (archive_read_open_fd(a, ifd, 10240) == ARCHIVE_OK) in ac_detect_ar()
376 ac_create_ar(struct elfcopy *ecp, int ifd, int ofd) in ac_create_ar() argument
379 ac_read_objs(ecp, ifd); in ac_create_ar()
386 ac_read_objs(struct elfcopy *ecp, int ifd) in ac_read_objs() argument
397 if (lseek(ifd, 0, SEEK_SET) == -1) in ac_read_objs()
402 AC(archive_read_open_fd(a, ifd, 10240)); in ac_read_objs()
/freebsd/contrib/ntp/util/
H A Dtickadj.c835 int ifd; in openfile() local
837 ifd = open(name, mode); in openfile()
838 if (ifd < 0) in openfile()
844 return ifd; in openfile()
880 int ifd, in readvar() argument
887 if (lseek(ifd, off, L_SET) == -1) in readvar()
893 i = read(ifd, (char *)var, sizeof(int)); in readvar()
/freebsd/sbin/nvmecontrol/
H A Dpassthru.c157 int fd = -1, ifd = -1; in passthru() local
170 if (*opt.ifn && (ifd = open(opt.ifn, O_RDONLY)) == -1) { in passthru()
192 (bytes_read = read(ifd, data, opt.data_len)) != in passthru()
258 if (ifd > -1) in passthru()
259 close(ifd); in passthru()

123