Home
last modified time | relevance | path

Searched full:ioctl (Results 1 – 25 of 1768) sorted by relevance

12345678910>>...71

/freebsd/usr.sbin/ctladm/tests/
H A Dport.sh59 "ioctl")
74 atf_set "descr" "ctladm can create a new ioctl port"
81 atf_check -o save:port-create.txt ctladm port -c -d "ioctl"
83 atf_check egrep -q "frontend: *ioctl" port-create.txt
86 atf_check -o save:portlist.txt ctladm portlist -qf ioctl
87 atf_check egrep -q "$portnum *YES *ioctl *ioctl" portlist.txt
91 cleanup ioctl
97 atf_set "descr" "ctladm will gracefully fail to remove an ioctl target if required arguments are missing"
104 atf_check -o save:port-create.txt ctladm port -c -d "ioctl"
[all...]
/freebsd/contrib/capsicum-test/
H A Dioctl.cc1 // Test that ioctl works in capability mode.
6 #include <sys/ioctl.h>
11 // Ensure that ioctl() works consistently for both regular file descriptors and
13 TEST(Ioctl, Basic) { in TEST() argument
28 EXPECT_OK(ioctl(fd, FIONREAD, &bytes)); in TEST()
29 EXPECT_NOTCAPABLE(ioctl(fd_no, FIONREAD, &bytes)); in TEST()
32 EXPECT_OK(ioctl(fd, FIOCLEX, &one)); in TEST()
33 EXPECT_NOTCAPABLE(ioctl(fd_no, FIOCLEX, &one)); in TEST()
40 TEST(Ioctl, SubRightNormalFD) { in TEST() argument
44 // Restrict the ioctl(2) subrights of a normal FD. in TEST()
[all …]
/freebsd/tests/sys/kern/
H A Dkcov.c33 #include <sys/ioctl.h>
82 ATF_CHECK(ioctl(fd, KIOSETBUFSIZE, 0) == -1); in ATF_TC_BODY()
83 ATF_CHECK(ioctl(fd, KIOSETBUFSIZE, 1) == -1); in ATF_TC_BODY()
84 ATF_CHECK(ioctl(fd, KIOSETBUFSIZE, 2) == 0); in ATF_TC_BODY()
85 ATF_CHECK(ioctl(fd, KIOSETBUFSIZE, 2) == -1); in ATF_TC_BODY()
106 ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, in ATF_TC_BODY()
142 ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, page_size / KCOV_ENTRY_SIZE) == 0); in ATF_TC_BODY()
162 ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, page_size / KCOV_ENTRY_SIZE) == 0); in ATF_TC_BODY()
178 ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, page_size / KCOV_ENTRY_SIZE) == 0); in kcov_mmap_enable_thread()
181 ATF_CHECK(ioctl(fd, KIOENABLE, KCOV_MODE_TRACE_PC) == 0); in kcov_mmap_enable_thread()
[all …]
/freebsd/tests/sys/netpfil/pf/ioctl/
H A Dvalidation.c29 #include <sys/ioctl.h>
86 if (ioctl(dev, DIOCRADDTABLES, &io) == 0) in ATF_TC_BODY()
91 if (ioctl(dev, DIOCRADDTABLES, &io) == 0) in ATF_TC_BODY()
97 if (ioctl(dev, DIOCRADDTABLES, &io) == 0) in ATF_TC_BODY()
106 ioctl(dev, DIOCRADDTABLES, &io); in ATF_TC_BODY()
137 if (ioctl(dev, DIOCRDELTABLES, &io) == 0) in ATF_TC_BODY()
142 if (ioctl(dev, DIOCRDELTABLES, &io) == 0) in ATF_TC_BODY()
148 if (ioctl(dev, DIOCRDELTABLES, &io) == 0) in ATF_TC_BODY()
181 if (ioctl(dev, DIOCRGETTABLES, &io) != 0) in ATF_TC_BODY()
186 if (ioctl(dev, DIOCRGETTABLES, &io) != 0) in ATF_TC_BODY()
[all …]
/freebsd/sbin/ipf/ipf/
H A Dipf.c10 #include <sys/ioctl.h>
47 static ioctlfunc_t iocfunctions[IPL_LOGSIZE] = { ioctl, ioctl, ioctl,
48 ioctl, ioctl, ioctl,
49 ioctl, ioctl };
136 ipf_dotuning(fd, optarg, ioctl); in main()
204 (ioctl(fd, SIOCGETFF, &i) == -1)) { in get_flags()
216 if (ioctl(fd, SIOCFRENB, &enable) == -1) { in set_state()
297 (ioctl(fd, SIOCSETFF, &flag) != 0)) in packetlogon()
298 ipferror(fd, "ioctl(SIOCSETFF)"); in packetlogon()
312 if (ioctl(xfd, SIOCGETLG, &logopt)) in packetlogon()
[all …]
/freebsd/share/examples/perfmon/
H A Dperfmon.c31 #include <sys/ioctl.h>
116 if (ioctl(fd, PMIOSETUP, &pmc) < 0) in main()
117 err(1, "ioctl(PMIOSETUP)"); in main()
119 if (ioctl(fd, PMIOTSTAMP, &then) < 0) in main()
120 err(1, "ioctl(PMIOTSTAMP)"); in main()
123 if (ioctl(fd, PMIOSTART, &num) < 0) in main()
124 err(1, "ioctl(PMIOSTART)"); in main()
128 if (ioctl(fd, PMIOSTOP, &num) < 0) in main()
129 err(1, "ioctl(PMIOSTOP)"); in main()
130 if (ioctl(fd, PMIOREAD, &value) < 0) in main()
[all …]
/freebsd/usr.sbin/bsnmpd/modules/snmp_bridge/
H A Dbridge_sys.c32 #include <sys/ioctl.h>
145 if (ioctl(sock, SIOCGDRVSPEC, &ifd) < 0) { in bridge_get_conf_param()
146 syslog(LOG_ERR, "update bridge: ioctl(BRDGGPRI) failed: %s", in bridge_get_conf_param()
155 if (ioctl(sock, SIOCGDRVSPEC, &ifd) < 0) { in bridge_get_conf_param()
156 syslog(LOG_ERR, "update bridge: ioctl(BRDGGMA) failed: %s", in bridge_get_conf_param()
166 if (ioctl(sock, SIOCGDRVSPEC, &ifd) < 0) { in bridge_get_conf_param()
167 syslog(LOG_ERR, "update bridge: ioctl(BRDGGHT) failed: %s", in bridge_get_conf_param()
175 if (ioctl(sock, SIOCGDRVSPEC, &ifd) < 0) { in bridge_get_conf_param()
176 syslog(LOG_ERR, "update bridge: ioctl(BRDGGFD) failed: %s", in bridge_get_conf_param()
184 if (ioctl(sock, SIOCGDRVSPEC, &ifd) < 0) { in bridge_get_conf_param()
[all …]
/freebsd/sbin/etherswitchcfg/
H A Detherswitchcfg.c40 #include <sys/ioctl.h>
126 if (ioctl(cfg->fd, IOETHERSWITCHGETREG, &er) != 0) in read_register()
127 err(EX_OSERR, "ioctl(IOETHERSWITCHGETREG)"); in read_register()
138 if (ioctl(cfg->fd, IOETHERSWITCHSETREG, &er) != 0) in write_register()
139 err(EX_OSERR, "ioctl(IOETHERSWITCHSETREG)"); in write_register()
149 if (ioctl(cfg->fd, IOETHERSWITCHGETPHYREG, &er) != 0) in read_phyregister()
150 err(EX_OSERR, "ioctl(IOETHERSWITCHGETPHYREG)"); in read_phyregister()
162 if (ioctl(cfg->fd, IOETHERSWITCHSETPHYREG, &er) != 0) in write_phyregister()
163 err(EX_OSERR, "ioctl(IOETHERSWITCHSETPHYREG)"); in write_phyregister()
181 if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0) in set_port_vid()
[all …]
/freebsd/tests/sys/auditpipe/
H A Dauditpipe_test.c26 #include <sys/ioctl.h>
42 atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, " in ATF_TC_HEAD()
50 ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLEN, &qlen)); in ATF_TC_BODY()
59 atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, " in ATF_TC_HEAD()
67 ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLIMIT, &qlimit)); in ATF_TC_BODY()
76 atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, " in ATF_TC_HEAD()
86 ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLIMIT, &curr_qlimit)); in ATF_TC_BODY()
93 * proper functioning of AUDITPIPE_SET_QLIMIT ioctl. in ATF_TC_BODY()
96 ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_SET_QLIMIT, &test_qlimit)); in ATF_TC_BODY()
98 ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLIMIT, &recv_qlimit)); in ATF_TC_BODY()
[all …]
/freebsd/share/man/man4/
H A Dpass.476 This ioctl takes most kinds of CAM CCBs and passes them through to the CAM
92 This ioctl takes an XPT_GDEVLIST CCB, and returns the passthrough device
94 Although this ioctl is available through the
98 ioctl.
99 It is probably more useful to issue this ioctl through the
113 This ioctl takes most CAM CCBs, but some CCB types are not allowed through
124 ioctl is not defined to take an argument, it does require a
128 .Xr ioctl 2
133 ioctl.
136 ioctl if there is an error allocating memory for the request or copying
[all …]
H A Dkcov.478 ioctl.
117 .Sh IOCTL INTERFACE
121 .Xr ioctl 2
165 if (ioctl(fd, KIOSETBUFSIZE, sz / KCOV_ENTRY_SIZE) != 0)
166 err(1, "ioctl(KIOSETBUFSIZE)");
172 if (ioctl(fd, KIOENABLE, KCOV_MODE_TRACE_PC) != 0)
173 err(1, "ioctl(KIOENABLE)");
175 /* Clear trace records from the preceding ioctl() call. */
181 if (ioctl(fd, KIODISABLE, 0) != 0)
182 err(1, "ioctl(KIODISABLE)");
[all …]
H A Dsnp.411 .Fn ioctl fd SNPSTTY &dev
13 .Fn ioctl fd SNPGTTY &dev
15 .Fn ioctl fd FIONREAD &result
33 ioctl on
37 .Xr ioctl 2
48 ioctl returns information about the current tty attached to
55 ioctl returns a positive value equal to the number of characters
/freebsd/lib/libvgl/
H A Dmain.c36 #include <sys/ioctl.h>
85 ioctl(0, FBIO_SETLINEWIDTH, &VGLOldVXsize); in VGLEnd()
88 ioctl(0, _IO('V', VGLOldMode - M_VESA_BASE), 0); in VGLEnd()
90 ioctl(0, _IO('S', VGLOldMode), 0); in VGLEnd()
95 ioctl(0, KDRASTER, size); in VGLEnd()
98 ioctl(0, KDDISABIO, 0); in VGLEnd()
99 ioctl(0, KDSETMODE, KD_TEXT); in VGLEnd()
101 ioctl(0, VT_SETMODE, &smode); in VGLEnd()
160 if (ioctl(0, CONS_GET, &VGLOldMode) || ioctl(0, CONS_CURRENT, &adptype)) in VGLInit()
166 if (ioctl(0, CONS_MODEINFO, &VGLModeInfo)) /* FBIO_MODEINFO */ in VGLInit()
[all …]
/freebsd/tools/tools/ath/common/
H A Dctrl.c39 * For now this'll be a drop-in replacement for the existing ioctl()
83 * a direct ioctl on the file descriptor.
129 ret = ioctl(req->s, cmd, ad); in ath_driver_req_fetch_diag()
131 warn("%s: ioctl", __func__); in ath_driver_req_fetch_diag()
149 /* ioctl */ in ath_driver_req_zero_stats()
150 ret = ioctl(req->s, SIOCZATHSTATS, &ifr); in ath_driver_req_zero_stats()
152 warn("%s: ioctl", __func__); in ath_driver_req_zero_stats()
170 /* ioctl */ in ath_driver_req_fetch_stats()
171 ret = ioctl(req->s, SIOCGATHSTATS, &ifr); in ath_driver_req_fetch_stats()
173 warn("%s: ioctl", __func__); in ath_driver_req_fetch_stats()
[all …]
/freebsd/sbin/devfs/
H A Drule.c35 #include <sys/ioctl.h>
119 rv = ioctl(mpfd, DEVFSIO_RADD, &dr); in rule_add()
121 err(1, "ioctl DEVFSIO_RADD"); in rule_add()
141 rv = ioctl(mpfd, DEVFSIO_RAPPLY, &dr); in rule_apply()
143 err(1, "ioctl DEVFSIO_RAPPLY"); in rule_apply()
147 rv = ioctl(mpfd, DEVFSIO_RAPPLYID, &rid); in rule_apply()
149 err(1, "ioctl DEVFSIO_RAPPLYID"); in rule_apply()
161 rv = ioctl(mpfd, DEVFSIO_SAPPLY, &in_rsnum); in rule_applyset()
163 err(1, "ioctl DEVFSIO_SAPPLY"); in rule_applyset()
176 rv = ioctl(mpfd, DEVFSIO_RDEL, &rid); in rule_del()
[all …]
/freebsd/sys/opencrypto/
H A Dcryptodev.c67 SDT_PROBE_DEFINE1(opencrypto, dev, ioctl, error, "int"/*line number*/);
352 SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); in cse_create()
356 SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); in cse_create()
365 SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); in cse_create()
369 SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); in cse_create()
393 SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); in cse_create()
404 SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); in cse_create()
421 SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); in cse_create()
429 SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); in cse_create()
440 SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); in cse_create()
[all …]
/freebsd/contrib/libpcap/
H A Dpcap-enet.c15 #include <sys/ioctl.h>
126 if (ioctl(fd, EIOSTATS, &es) == -1) { in wrapup()
127 perror("tcpdump: enet ioctl EIOSTATS error"); in wrapup()
168 if (ioctl(if_fd, EIOCGETP, (char *)&ctl) == -1) { in initdevice()
169 perror("tcpdump: enet ioctl EIOCGETP error"); in initdevice()
184 if (ioctl(if_fd, EIOCSETP, &ctl) == -1) { in initdevice()
185 perror("tcpdump: enet ioctl EIOCSETP error"); in initdevice()
193 if (ioctl(if_fd, EIOCFLUSH) == -1) { in initdevice()
194 perror("tcpdump: enet ioctl EIOCFLUSH error"); in initdevice()
201 if (ioctl(if_fd, EIOCSETW, &maxwaiting) == -1) { in initdevice()
[all …]
/freebsd/tools/regression/audit/audit_pipe_ioctl/
H A Daudit_pipe_ioctl.c36 #include <sys/ioctl.h>
59 if (ioctl(fd, AUDITPIPE_GET_QLEN, &len) < 0) in main()
65 if (ioctl(fd, AUDITPIPE_GET_QLIMIT_MIN, &minlen) < 0) in main()
71 if (ioctl(fd, AUDITPIPE_GET_QLIMIT_MAX, &maxlen) < 0) in main()
77 if (ioctl(fd, AUDITPIPE_GET_QLIMIT, &len) < 0) in main()
93 if (ioctl(fd, AUDITPIPE_SET_QLIMIT, &len) < 0) in main()
96 if (ioctl(fd, AUDITPIPE_GET_QLIMIT, &len) < 0) in main()
103 if (ioctl(fd, AUDITPIPE_SET_QLIMIT, &len) < 0) in main()
106 if (ioctl(fd, AUDITPIPE_GET_QLIMIT, &len) < 0) in main()
117 if (ioctl(fd, AUDITPIPE_GET_INSERTS, &astat) < 0) in main()
[all …]
/freebsd/usr.sbin/cpucontrol/
H A Damd10h.c29 #include <sys/ioctl.h>
59 error = ioctl(fd, CPUCTL_CPUID, &idargs); in amd10h_probe()
61 WARN(0, "ioctl()"); in amd10h_probe()
72 error = ioctl(fd, CPUCTL_CPUID, &idargs); in amd10h_probe()
74 WARN(0, "ioctl()"); in amd10h_probe()
111 error = ioctl(devfd, CPUCTL_CPUID, &idargs); in amd10h_update()
113 WARN(0, "ioctl()"); in amd10h_update()
119 error = ioctl(devfd, CPUCTL_RDMSR, &msrargs); in amd10h_update()
121 WARN(0, "ioctl(%s)", dev); in amd10h_update()
136 error = ioctl(devfd, CPUCTL_UPDATE, &args); in amd10h_update()
[all …]
/freebsd/lib/libsys/
H A Dioctl.232 .Nm ioctl
39 .Fn ioctl "int fd" "unsigned long request" ...
42 .Fn ioctl
47 .Fn ioctl
54 .Fn ioctl
58 .Fn ioctl ,
65 .Fn ioctl
75 Macros and defines used in specifying an ioctl
109 .Fn ioctl
149 .Fn ioctl
/freebsd/contrib/ntp/libntp/
H A Diosignal.c25 # include <sys/ioctl.h>
87 if (ioctl(rio->fd, I_SETSIG, S_INPUT) < 0) in init_clock_sig()
90 "init_clock_sig: ioctl(I_SETSIG, S_INPUT) failed: %m"); in init_clock_sig()
107 if (ioctl(rio->fd, FIOSSAIOOWN, (char *)&pgrp) == -1) in init_clock_sig()
109 msyslog(LOG_ERR, "ioctl(FIOSSAIOOWN) fails for clock I/O: %m - EXITING"); in init_clock_sig()
117 if (ioctl(rio->fd, FIOSNBIO, (char *)&on) == -1) in init_clock_sig()
119 msyslog(LOG_ERR, "ioctl(FIOSNBIO) fails for clock I/O: %m - EXITING"); in init_clock_sig()
124 if (ioctl(rio->fd, FIOSSAIOSTAT, (char *)&on) == -1) in init_clock_sig()
126 msyslog(LOG_ERR, "ioctl(FIOSSAIOSTAT) fails for clock I/O: %m - EXITING"); in init_clock_sig()
143 if (ioctl(rio->fd, FIOASYNC, (char *)&on) == -1) in init_clock_sig()
[all …]
/freebsd/contrib/tcsh/
H A Dtc.disc.c75 if (ioctl(f, TCGETA, (ioctl_t) & termiob) == 0) {
84 if (ioctl(f, TCSETA, (ioctl_t) & termiob) != 0)
104 if (ioctl(f, TCGETA, (ioctl_t) & termiob) == 0) {
109 if (ioctl(f, TIOCGLTC, (ioctl_t) & ltcbuf) != 0)
118 if (ioctl(f, TIOCSLTC, (ioctl_t) & ltcbuf) != 0)
122 if (ioctl(f, TCSETAF, (ioctl_t) & termiob) != 0)
138 if (ioctl(f, TXGETLD, (ioctl_t) & tx) == 0) {
140 if (ioctl(f, TXADDCD, (ioctl_t) strPOSIX) == 0) {
152 if (ioctl(f, TIOCGETD, (ioctl_t) & oldisc) == 0) {
156 if (ioctl(f, TIOCSETD, (ioctl_t) & ldisc) != 0)
[all …]
/freebsd/usr.sbin/apm/
H A Dapm.c18 #include <sys/ioctl.h>
116 if (ioctl(fd, APMIO_SUSPEND, NULL) == -1) in apm_suspend()
117 err(1, "ioctl(APMIO_SUSPEND)"); in apm_suspend()
123 if (ioctl(fd, APMIO_STANDBY, NULL) == -1) in apm_standby()
124 err(1, "ioctl(APMIO_STANDBY)"); in apm_standby()
130 if (ioctl(fd, APMIO_GETINFO, aip) == -1) in apm_getinfo()
131 err(1, "ioctl(APMIO_GETINFO)"); in apm_getinfo()
138 if (ioctl(fd, APMIO_ENABLE) == -1) in apm_enable()
139 err(1, "ioctl(APMIO_ENABLE)"); in apm_enable()
141 if (ioctl(fd, APMIO_DISABLE) == -1) in apm_enable()
[all …]
/freebsd/sbin/ipf/ippool/
H A Dippool.c12 #include <sys/ioctl.h>
231 err = load_poolnode(role, poolname, &pnode, ttl, ioctl); in poolnodecommand()
233 err = remove_poolnode(role, poolname, &pnode, ioctl); in poolnodecommand()
237 err = load_hashnode(role, poolname, &hnode, ttl, ioctl); in poolnodecommand()
239 err = remove_hashnode(role, poolname, &hnode, ioctl); in poolnodecommand()
338 err = load_hash(&iph, NULL, ioctl); in poolcommand()
341 err = load_pool(&pool, ioctl); in poolcommand()
348 err = remove_hash(&iph, ioctl); in poolcommand()
351 err = remove_pool(&pool, ioctl); in poolcommand()
357 err_h = remove_hash(&iph, ioctl); in poolcommand()
[all …]
/freebsd/sys/xen/
H A Dgntdev.h40 * 1. Do an `IOCTL_GNTDEV_ALLOC_GREF ioctl`, with
51 * 2. Mmap the address given in `index` after a successful ioctl.
59 * - IOCTL_GNTDEV_DEALLOC_GREF ioctl has been performed. After you
60 * perform this ioctl, you can no longer mmap or set notify on
66 * pages, individually; you can mmap and dealloc-ioctl a contiguous
74 * 1. Do a `IOCTL_GNTDEV_MAP_GRANT_REF` ioctl, with
79 * 2. Mmap the address given in `index` after a successful ioctl.
84 * 2. The unit is defined by the map ioctl. This means that only one
86 * mapped together in one ioctl, and also no single mapping of contiguous
92 * - IOCTL_GNTDEV_UNMAP_GRANT_REF ioctl has been called.
[all …]

12345678910>>...71