| /freebsd/contrib/wpa/src/common/ |
| H A D | wpa_helpers.c | 3 * Copyright (c) 2010-2011, Atheros Communications, Inc. 4 * Copyright (c) 2011-2012, Qualcomm Atheros, Inc. 25 struct wpa_ctrl *ctrl; in wpa_open_ctrl() local 28 ctrl = wpa_ctrl_open(buf); in wpa_open_ctrl() 29 if (ctrl == NULL) in wpa_open_ctrl() 31 return ctrl; in wpa_open_ctrl() 37 struct wpa_ctrl *ctrl; in wpa_command() local 39 size_t len; in wpa_command() local 42 ctrl = wpa_open_ctrl(ifname); in wpa_command() 43 if (ctrl == NULL) in wpa_command() [all …]
|
| H A D | wpa_ctrl.c | 3 * Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi> 45 * struct wpa_ctrl - Internal structure for control interface library 97 struct wpa_ctrl *ctrl; in wpa_ctrl_open2() local 107 ctrl = os_zalloc(sizeof(*ctrl)); in wpa_ctrl_open2() 108 if (ctrl == NULL) in wpa_ctrl_open2() 111 ctrl->s = socket(PF_UNIX, SOCK_DGRAM, 0); in wpa_ctrl_open2() 112 if (ctrl->s < 0) { in wpa_ctrl_open2() 113 os_free(ctrl); in wpa_ctrl_open2() 117 ctrl->local.sun_family = AF_UNIX; in wpa_ctrl_open2() 121 ret = os_snprintf(ctrl->local.sun_path, in wpa_ctrl_open2() [all …]
|
| H A D | dpp_tcp.c | 3 * Copyright (c) 2019-2020, The Linux Foundation 4 * Copyright (c) 2021-2022, Qualcomm Innovation Center, Inc. 25 struct dpp_controller *ctrl; member 66 size_t len); 104 if (conn->sock >= 0) { in dpp_connection_free() 106 conn->sock); in dpp_connection_free() 107 eloop_unregister_sock(conn->sock, EVENT_TYPE_READ); in dpp_connection_free() 108 eloop_unregister_sock(conn->sock, EVENT_TYPE_WRITE); in dpp_connection_free() 109 close(conn->sock); in dpp_connection_free() 119 wpabuf_free(conn->msg); in dpp_connection_free() [all …]
|
| /freebsd/contrib/wpa/wpa_supplicant/ |
| H A D | ctrl_iface_named_pipe.c | 2 * WPA Supplicant / Windows Named Pipe -based control interface 3 * Copyright (c) 2004-2006, Jouni Malinen <j@w1.fi> 20 /* mingw-w32api v3.1 does not yet include sddl.h, so define needed parts here 46 /* Per-interface ctrl_iface */ 54 * struct wpa_ctrl_dst - Internal data structure of control interface clients 85 size_t len); 118 dst = priv->ctrl_dst; in ctrl_flush_broken_pipes() 121 next = dst->next; in ctrl_flush_broken_pipes() 122 if (ctrl_broken_pipe(dst->pipe, dst->used)) { in ctrl_flush_broken_pipes() 123 wpa_printf(MSG_DEBUG, "CTRL: closing broken pipe %p", in ctrl_flush_broken_pipes() [all …]
|
| H A D | wpa_cli.c | 2 * WPA Supplicant - command line interface for wpa_supplicant daemon 3 * Copyright (c) 2004-2022, Jouni Malinen <j@w1.fi> 32 "Copyright (c) 2004-2024, Jouni Malinen <j@w1.fi> and contributors"; 44 static int wpa_cli_connected = -1; 76 static void update_creds(struct wpa_ctrl *ctrl); 77 static void update_networks(struct wpa_ctrl *ctrl); 78 static void update_stations(struct wpa_ctrl *ctrl); 79 static void update_ifnames(struct wpa_ctrl *ctrl); 84 printf("wpa_cli [-p<path to ctrl sockets>] [-i<ifname>] [-hvBr] " in usage() 85 "[-a<action file>] \\\n" in usage() [all …]
|
| H A D | ctrl_iface_unix.c | 2 * WPA Supplicant / UNIX domain socket -based control interface 3 * Copyright (c) 2004-2020, Jouni Malinen <j@w1.fi> 32 /* Per-interface ctrl_iface */ 59 size_t len; member 67 size_t len, 77 size_t len) in wpas_ctrl_sock_debug() argument 84 if (len >= 5 && os_strncmp(buf, "PONG\n", 5) == 0) in wpas_ctrl_sock_debug() 90 sndbuf = -1; in wpas_ctrl_sock_debug() 93 outq = -1; in wpas_ctrl_sock_debug() 96 "CTRL-DEBUG: %s: sock=%d sndbuf=%d outq=%d send_len=%d", in wpas_ctrl_sock_debug() [all …]
|
| H A D | libwpa_test.c | 2 * libwpa_test - Test program for libwpa_client.* library linking 15 struct wpa_ctrl *ctrl; in main() local 17 ctrl = wpa_ctrl_open("foo"); in main() 18 if (!ctrl) in main() 19 return -1; in main() 20 if (wpa_ctrl_attach(ctrl) == 0) in main() 21 wpa_ctrl_detach(ctrl); in main() 22 if (wpa_ctrl_pending(ctrl)) { in main() 24 size_t len; in main() local 26 len = sizeof(buf); in main() [all …]
|
| H A D | eapol_test.py | 25 self.ctrl = wpaspy.Ctrl(os.path.join(wpas_ctrl, ifname)) 26 if "PONG" not in self.ctrl.request("PING"): 28 self.mon = wpaspy.Ctrl(os.path.join(wpas_ctrl, ifname)) 56 return self.ctrl.request(cmd, timeout=timeout) 68 remaining = start + timeout - now 85 if len(conf): 103 ev = et.wait_event(["CTRL-EVENT-CONNECTED", "CTRL-EVENT-EAP-FAILURE"]) 104 if ev is None or "CTRL-EVENT-CONNECTED" not in ev: 117 parser.add_argument('--ctrl', help='control interface directory') 118 parser.add_argument('--num', help='number of processes') [all …]
|
| /freebsd/sys/dev/usb/input/ |
| H A D | usbhid.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 105 struct usb_device_request ctrl; /* CTRL xfers */ member 156 int len; in usbhid_intr_out_callback() local 162 len = xfer_ctx->req.intr.maxlen; in usbhid_intr_out_callback() 163 if (len == 0) { in usbhid_intr_out_callback() 165 xfer_ctx->error = 0; in usbhid_intr_out_callback() 169 usbd_copy_in(pc, 0, xfer_ctx->buf, len); in usbhid_intr_out_callback() 170 usbd_xfer_set_frame_len(xfer, 0, len); in usbhid_intr_out_callback() 172 xfer_ctx->req.intr.maxlen = 0; in usbhid_intr_out_callback() [all …]
|
| /freebsd/usr.sbin/bluetooth/bthidd/ |
| H A D | server.c | 5 /*- 6 * SPDX-License-Identifier: BSD-2-Clause 71 srv->ctrl = srv->intr = -1; in server_init() 72 FD_ZERO(&srv->rfdset); in server_init() 73 FD_ZERO(&srv->wfdset); in server_init() 74 LIST_INIT(&srv->sessions); in server_init() 77 srv->cons = open("/dev/consolectl", O_RDWR); in server_init() 78 if (srv->cons < 0) { in server_init() 81 return (-1); in server_init() 85 srv->ctrl = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BLUETOOTH_PROTO_L2CAP); in server_init() [all …]
|
| /freebsd/contrib/wpa/hostapd/ |
| H A D | hostapd_cli.c | 2 * hostapd - command line interface for hostapd daemon 3 * Copyright (c) 2004-2022, Jouni Malinen <j@w1.fi> 24 "Copyright (c) 2004-2024, Jouni Malinen <j@w1.fi> and contributors"; 48 static void update_stations(struct wpa_ctrl *ctrl); 57 "usage: hostapd_cli [-p<path>] [-i<ifname>] [-hvBr] " in usage() 58 "[-a<path>] \\\n" in usage() 59 " [-P<pid file>] [-G<ping interval>] [command..]\n" in usage() 62 " -h help (show this usage text)\n" in usage() 63 " -v shown version information\n" in usage() 64 " -p<path> path to find control sockets (default: " in usage() [all …]
|
| /freebsd/sys/dev/cxgbe/cudbg/ |
| H A D | fastlz.c | 2 FastLZ - lightning-fast lossless compression library 70 * Prevent accessing more than 8-bit at once, except on x86 architectures. 105 #define HASH_MASK (HASH_SIZE - 1) 109 (v>>(16 - HASH_LOG));\ 131 #define MAX_FARDISTANCE (65535 + MAX_DISTANCE - 1) 185 const unsigned char *ip_bound = ip + length - 2; in FASTLZ_COMPRESSOR() 186 const unsigned char *ip_limit = ip + length - 12; in FASTLZ_COMPRESSOR() 200 *op++ = length - 1; in FASTLZ_COMPRESSOR() 215 *op++ = MAX_COPY - 1; in FASTLZ_COMPRESSOR() 225 unsigned int len = 3; in FASTLZ_COMPRESSOR() local [all …]
|
| /freebsd/sys/amd64/vmm/amd/ |
| H A D | amdvi_hw.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 63 #define MOD_DEC(a, s, m) (((a) - (s)) % ((m) * (s))) 127 return (pci_cfgregread(softc->pci_seg, PCI_RID2BUS(softc->pci_rid), in amdvi_pci_read() 128 PCI_RID2SLOT(softc->pci_rid), PCI_RID2FUNC(softc->pci_rid), in amdvi_pci_read() 136 * If ATS is absent or disabled, return (-1), otherwise ATS 144 int qlen = -1; in amdvi_find_ats_qlen() 150 return (-1); in amdvi_find_ats_qlen() 158 printf("AMD-Vi: PCI device %d.%d.%d ATS %s qlen=%d\n", in amdvi_find_ats_qlen() 162 qlen = (cap & PCIM_ATS_EN) ? qlen : -1; in amdvi_find_ats_qlen() [all …]
|
| /freebsd/sys/contrib/dev/mediatek/mt76/ |
| H A D | dma.c | 1 // SPDX-License-Identifier: ISC 6 #include <linux/dma-mapping.h> 19 if ((_q)->flags & MT_QFLAG_WED) \ 20 _val = mtk_wed_device_reg_read((_q)->wed, \ 21 ((_q)->wed_regs + \ 24 _val = readl(&(_q)->regs->_field); \ 30 if ((_q)->flags & MT_QFLAG_WED) \ 31 mtk_wed_device_reg_write((_q)->wed, \ 32 ((_q)->wed_regs + _offset), \ 35 writel(_val, &(_q)->regs->_field); \ [all …]
|
| H A D | sdio.c | 1 // SPDX-License-Identifier: ISC 25 return sdio_readl(dev->sdio.func, MCR_WHISR, NULL); in mt76s_read_whisr() 30 struct mt76_sdio *sdio = &dev->sdio; in mt76s_read_pcr() 32 return sdio_readl(sdio->func, MCR_WHLPCR, NULL); in mt76s_read_pcr() 38 struct sdio_func *func = dev->sdio.func; in mt76s_read_mailbox() 46 dev_err(dev->dev, "failed setting address [err=%d]\n", err); in mt76s_read_mailbox() 52 dev_err(dev->dev, "failed setting read mode [err=%d]\n", err); in mt76s_read_mailbox() 59 dev_err(dev->dev, "query whisr timeout\n"); in mt76s_read_mailbox() 65 dev_err(dev->dev, "failed setting read mode [err=%d]\n", err); in mt76s_read_mailbox() 71 dev_err(dev->dev, "failed reading h2dsm0r [err=%d]\n", err); in mt76s_read_mailbox() [all …]
|
| /freebsd/sbin/hastd/ |
| H A D | lzf.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2000-2008 Marc Alexander Lehmann <schmorp@schmorp.de> 6 * Redistribution and use in source and binary forms, with or without modifica- 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- 19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- 171 unsigned int len = 2; lzf_compress() local 307 lzf_movsb(dst,src,len) global() argument 324 unsigned int ctrl = *ip++; lzf_decompress() local 354 unsigned int len = ctrl >> 5; lzf_decompress() local [all...] |
| /freebsd/contrib/ofed/libmlx4/ |
| H A D | qp.c | 16 * - Redistributions of source code must retain the above 20 * - Redistributions in binary form must reproduce the above 61 return qp->buf.buf + qp->rq.offset + (n << qp->rq.wqe_shift); in get_recv_wqe() 66 return qp->buf.buf + qp->sq.offset + (n << qp->sq.wqe_shift); in get_send_wqe() 78 int ds = (((struct mlx4_wqe_ctrl_seg *)wqe)->fence_size & 0x3f) << 2; in stamp_send_wqe() 86 qp->sq.head = 0; in mlx4_init_qp_indices() 87 qp->sq.tail = 0; in mlx4_init_qp_indices() 88 qp->rq.head = 0; in mlx4_init_qp_indices() 89 qp->rq.tail = 0; in mlx4_init_qp_indices() 94 struct mlx4_wqe_ctrl_seg *ctrl; in mlx4_qp_init_sq_ownership() local [all …]
|
| /freebsd/contrib/libpcap/ |
| H A D | pcap-usb-linux.c | 39 #include "pcap-int.h" 40 #include "pcap-usb-linux.h" 41 #include "pcap-usb-linux-common.h" 72 #include "diag-control.h" 77 #define USBMON_DEV_PREFIX_LEN (sizeof USBMON_DEV_PREFIX - 1) 127 u_char *mmapbuf; /* memory-mapped region pointer */ 150 * XXX - is there any notion of "up" and "running"? in usb_dev_add() 161 return -1; in usb_dev_add() 164 * XXX - is there a way to determine whether anything's in usb_dev_add() 171 return -1; in usb_dev_add() [all …]
|
| /freebsd/sys/dev/mlx4/mlx4_en/ |
| H A D | mlx4_en_tx.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 59 struct mlx4_en_dev *mdev = priv->mdev; in mlx4_en_create_tx_ring() 70 return -ENOMEM; in mlx4_en_create_tx_ring() 75 if ((err = -bus_dma_tag_create( in mlx4_en_create_tx_ring() 76 bus_get_dma_tag(mdev->pdev->dev.bsddev), in mlx4_en_create_tx_ring() 87 &ring->dma_tag))) in mlx4_en_create_tx_ring() 90 ring->size = size; in mlx4_en_create_tx_ring() 91 ring->size_mask = size - 1; in mlx4_en_create_tx_ring() 92 ring->stride = stride; in mlx4_en_create_tx_ring() [all …]
|
| /freebsd/sys/arm/nvidia/ |
| H A D | as3722_gpio.c | 1 /*- 71 #define GPIO_LOCK(_sc) sx_slock(&(_sc)->gpio_lock) 72 #define GPIO_UNLOCK(_sc) sx_unlock(&(_sc)->gpio_lock) 73 #define GPIO_ASSERT(_sc) sx_assert(&(_sc)->gpio_lock, SA_LOCKED) 85 {"bias-disable", AS3722_CFG_BIAS_DISABLE}, 86 {"bias-pull-up", AS3722_CFG_BIAS_PULL_UP}, 87 {"bias-pull-down", AS3722_CFG_BIAS_PULL_DOWN}, 88 {"bias-high-impedance", AS3722_CFG_BIAS_HIGH_IMPEDANCE}, 89 {"drive-open-drain", AS3722_CFG_OPEN_DRAIN}, 97 {"interrupt-out", AS3722_IOSF_INTERRUPT_OUT}, [all …]
|
| /freebsd/contrib/ofed/libmlx5/ |
| H A D | qp.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 63 return qp->buf.buf + qp->rq.offset + (n << qp->rq.wqe_shift); in get_recv_wqe() 68 return rwq->pbuff + (n << rwq->rq.wqe_shift); in get_wq_recv_wqe() 81 copy = min_t(long, *size, be32toh(scat->byte_count)); in copy_to_scat() 82 memcpy((void *)(unsigned long)be64toh(scat->addr), buf, copy); in copy_to_scat() 83 *size -= copy; in copy_to_scat() 96 int max = 1 << (qp->rq.wqe_shift - 4); in mlx5_copy_to_recv_wqe() 99 if (unlikely(qp->wq_sig)) in mlx5_copy_to_recv_wqe() 107 struct mlx5_wqe_ctrl_seg *ctrl; in mlx5_copy_to_send_wqe() local [all …]
|
| /freebsd/sys/dev/mlx5/mlx5_en/ |
| H A D | mlx5_en_tx.c | 1 /*- 2 * Copyright (c) 2015-2021 Mellanox Technologies. All rights reserved. 38 sq->cev_counter++; in mlx5e_do_send_cqe_inline() 40 if (sq->cev_counter >= sq->cev_factor) { in mlx5e_do_send_cqe_inline() 41 sq->cev_counter = 0; in mlx5e_do_send_cqe_inline() 57 u16 pi = sq->pc & sq->wq.sz_m1; in mlx5e_send_nop() 58 struct mlx5e_tx_wqe *wqe = mlx5_wq_cyc_get_wqe(&sq->wq, pi); in mlx5e_send_nop() 60 memset(&wqe->ctr in mlx5e_send_nop() 540 struct mlx5_wqe_ctrl_seg ctrl; global() member 623 u32 len = segs[x].ds_len - off; mlx5e_sq_dump_xmit() local [all...] |
| /freebsd/usr.sbin/bhyve/ |
| H A D | pci_virtio_console.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 187 vi_reset_dev(&sc->vsc_vs); in pci_vtcon_reset() 195 sc->vsc_features = negotiated_features; in pci_vtcon_neg_features() 204 ptr = (uint8_t *)sc->vsc_config + offset; in pci_vtcon_cfgread() 219 uint16_t num = vq->vq_num; in pci_vtcon_vq_to_port() 222 return (&sc->vsc_ports[0]); in pci_vtcon_vq_to_port() 225 return (&sc->vsc_control_port); in pci_vtcon_vq_to_port() 227 return (&sc->vsc_ports[(num / 2) - 1]); in pci_vtcon_vq_to_port() 235 qnum = tx_queue ? port->vsp_txq : port->vsp_rxq; in pci_vtcon_port_to_vq() [all …]
|
| /freebsd/crypto/heimdal/lib/roken/ |
| H A D | rkpty.c | 151 size_t len = strlen(s); in iscmd() local 152 if (strncmp(buf, s, len) != 0) in iscmd() 154 return estrdup(buf + len); in iscmd() 179 c->lineno = lineno; in parse_configuration() 181 next = &(c->next); in parse_configuration() 184 c->type = CMD_EXPECT; in parse_configuration() 185 c->str = str; in parse_configuration() 187 c->type = CMD_SEND; in parse_configuration() 188 c->str = str; in parse_configuration() 190 c->type = CMD_PASSWORD; in parse_configuration() [all …]
|
| /freebsd/contrib/wpa/src/fst/ |
| H A D | fst.c | 52 if (os_strcmp(cfg->group_id, fst_group_get_id(g)) == 0) { in fst_attach() 59 group = fst_group_create(cfg->group_id); in fst_attach() 62 cfg->group_id); in fst_attach() 84 cfg->group_id, cfg->priority, cfg->llt); in fst_attach() 134 struct fst_ctrl_handle * fst_global_add_ctrl(const struct fst_ctrl *ctrl) in fst_global_add_ctrl() argument 138 if (!ctrl) in fst_global_add_ctrl() 145 if (ctrl->init && ctrl->init()) { in fst_global_add_ctrl() 150 h->ctrl = *ctrl; in fst_global_add_ctrl() 151 dl_list_add_tail(&fst_global_ctrls_list, &h->global_ctrls_lentry); in fst_global_add_ctrl() 159 dl_list_del(&h->global_ctrls_lentry); in fst_global_del_ctrl() [all …]
|