| /freebsd-11-stable/sys/geom/ |
| HD | geom_ctl.c | 91 gctl_error(struct gctl_req *req, const char *fmt, ...) in gctl_error() argument 95 if (req == NULL) in gctl_error() 99 if (sbuf_done(req->serror)) { in gctl_error() 100 if (!req->nerror) in gctl_error() 101 req->nerror = EEXIST; in gctl_error() 102 return (req->nerror); in gctl_error() 104 if (!req->nerror) in gctl_error() 105 req->nerror = EINVAL; in gctl_error() 108 sbuf_vprintf(req->serror, fmt, ap); in gctl_error() 110 sbuf_finish(req->serror); in gctl_error() [all …]
|
| /freebsd-11-stable/sys/dev/netmap/ |
| HD | netmap_legacy.c | 60 struct nmreq_register *req) in nmreq_register_from_legacy() argument 62 req->nr_offset = nmr->nr_offset; in nmreq_register_from_legacy() 63 req->nr_memsize = nmr->nr_memsize; in nmreq_register_from_legacy() 64 req->nr_tx_slots = nmr->nr_tx_slots; in nmreq_register_from_legacy() 65 req->nr_rx_slots = nmr->nr_rx_slots; in nmreq_register_from_legacy() 66 req->nr_tx_rings = nmr->nr_tx_rings; in nmreq_register_from_legacy() 67 req->nr_rx_rings = nmr->nr_rx_rings; in nmreq_register_from_legacy() 68 req->nr_mem_id = nmr->nr_arg2; in nmreq_register_from_legacy() 69 req->nr_ringid = nmr->nr_ringid & NETMAP_RING_MASK; in nmreq_register_from_legacy() 81 req->nr_mode = regmode; in nmreq_register_from_legacy() [all …]
|
| /freebsd-11-stable/contrib/mdocml/ |
| HD | cgi.c | 57 struct req { struct 72 static void parse_manpath_conf(struct req *); argument 73 static void parse_path_info(struct req *req, const char *path); 74 static void parse_query_string(struct req *, const char *); 77 static void pg_index(const struct req *); 78 static void pg_noresult(const struct req *, const char *); 79 static void pg_redirect(const struct req *, const char *); 80 static void pg_search(const struct req *); 81 static void pg_searchres(const struct req *, 83 static void pg_show(struct req *, const char *); [all …]
|
| /freebsd-11-stable/lib/libgeom/ |
| HD | geom_ctl.c | 54 gctl_dump(struct gctl_req *req, FILE *f) in gctl_dump() argument 60 if (req == NULL) { in gctl_dump() 64 fprintf(f, "Dump of gctl request at %p:\n", req); in gctl_dump() 65 if (req->error != NULL) in gctl_dump() 66 fprintf(f, " error:\t\"%s\"\n", req->error); in gctl_dump() 69 for (i = 0; i < req->narg; i++) { in gctl_dump() 70 ap = &req->arg[i]; in gctl_dump() 95 gctl_set_error(struct gctl_req *req, const char *error, ...) in gctl_set_error() argument 99 if (req->error != NULL) in gctl_set_error() 102 vasprintf(&req->error, error, ap); in gctl_set_error() [all …]
|
| /freebsd-11-stable/sbin/geom/class/eli/ |
| HD | geom_eli.c | 66 static void eli_main(struct gctl_req *req, unsigned flags); 67 static void eli_init(struct gctl_req *req); 68 static void eli_attach(struct gctl_req *req); 69 static void eli_configure(struct gctl_req *req); 70 static void eli_setkey(struct gctl_req *req); 71 static void eli_delkey(struct gctl_req *req); 72 static void eli_resume(struct gctl_req *req); 73 static void eli_kill(struct gctl_req *req); 74 static void eli_backup(struct gctl_req *req); 75 static void eli_restore(struct gctl_req *req); [all …]
|
| /freebsd-11-stable/sys/dev/io/ |
| HD | iodev.c | 51 static int iopio_read(struct iodev_pio_req *req); 52 static int iopio_write(struct iodev_pio_req *req); 122 iopio_read(struct iodev_pio_req *req) in iopio_read() argument 125 switch (req->width) { in iopio_read() 127 req->val = iodev_read_1(req->port); in iopio_read() 130 if (req->port & 1) { in iopio_read() 131 req->val = iodev_read_1(req->port); in iopio_read() 132 req->val |= iodev_read_1(req->port + 1) << 8; in iopio_read() 134 req->val = iodev_read_2(req->port); in iopio_read() 137 if (req->port & 1) { in iopio_read() [all …]
|
| /freebsd-11-stable/sys/dev/bnxt/ |
| HD | bnxt_hwrm.c | 43 struct hwrm_port_phy_cfg_input *req); 45 struct hwrm_port_phy_cfg_input *req); 47 struct hwrm_port_phy_cfg_input *req); 107 struct input *req = request; in bnxt_hwrm_cmd_hdr_init() local 109 req->req_type = htole16(req_type); in bnxt_hwrm_cmd_hdr_init() 110 req->cmpl_ring = 0xffff; in bnxt_hwrm_cmd_hdr_init() 111 req->target_id = 0xffff; in bnxt_hwrm_cmd_hdr_init() 112 req->resp_addr = htole64(softc->hwrm_cmd_resp.idi_paddr); in bnxt_hwrm_cmd_hdr_init() 118 struct input *req = msg; in _hwrm_send_message() local 129 req->seq_id = htole16(softc->hwrm_cmd_seq++); in _hwrm_send_message() [all …]
|
| /freebsd-11-stable/usr.sbin/ctld/ |
| HD | isns.c | 52 struct isns_req *req; in isns_req_alloc() local 54 req = calloc(sizeof(struct isns_req), 1); in isns_req_alloc() 55 if (req == NULL) { in isns_req_alloc() 59 req->ir_buflen = sizeof(struct isns_hdr); in isns_req_alloc() 60 req->ir_usedlen = 0; in isns_req_alloc() 61 req->ir_buf = calloc(req->ir_buflen, 1); in isns_req_alloc() 62 if (req->ir_buf == NULL) { in isns_req_alloc() 63 free(req); in isns_req_alloc() 67 return (req); in isns_req_alloc() 73 struct isns_req *req; in isns_req_create() local [all …]
|
| HD | kernel.c | 670 struct ctl_lun_req req; in kernel_lun_add() local 673 bzero(&req, sizeof(req)); in kernel_lun_add() 675 strlcpy(req.backend, lun->l_backend, sizeof(req.backend)); in kernel_lun_add() 676 req.reqtype = CTL_LUNREQ_CREATE; in kernel_lun_add() 678 req.reqdata.create.blocksize_bytes = lun->l_blocksize; in kernel_lun_add() 681 req.reqdata.create.lun_size_bytes = lun->l_size; in kernel_lun_add() 684 req.reqdata.create.req_lun_id = lun->l_ctl_lun; in kernel_lun_add() 685 req.reqdata.create.flags |= CTL_LUN_FLAG_ID_REQ; in kernel_lun_add() 688 req.reqdata.create.flags |= CTL_LUN_FLAG_DEV_TYPE; in kernel_lun_add() 689 req.reqdata.create.device_type = lun->l_device_type; in kernel_lun_add() [all …]
|
| /freebsd-11-stable/usr.sbin/mpsutil/ |
| HD | mps_cmd.c | 290 MPI2_CONFIG_REQUEST req; in mps_read_config_page_header() local 293 bzero(&req, sizeof(req)); in mps_read_config_page_header() 294 req.Function = MPI2_FUNCTION_CONFIG; in mps_read_config_page_header() 295 req.Action = MPI2_CONFIG_ACTION_PAGE_HEADER; in mps_read_config_page_header() 296 req.Header.PageType = PageType; in mps_read_config_page_header() 297 req.Header.PageNumber = PageNumber; in mps_read_config_page_header() 298 req.PageAddress = PageAddress; in mps_read_config_page_header() 300 if (mps_pass_command(fd, &req, sizeof(req), &reply, sizeof(reply), in mps_read_config_page_header() 318 MPI2_CONFIG_REQUEST req; in mps_read_ext_config_page_header() local 321 bzero(&req, sizeof(req)); in mps_read_ext_config_page_header() [all …]
|
| /freebsd-11-stable/sys/dev/twa/ |
| HD | tw_osl_freebsd.c | 509 struct tw_osli_req_context *req; in tw_osli_alloc_mem() local 700 req = &(sc->req_ctx_buf[i]); in tw_osli_alloc_mem() 701 req->ctlr = sc; in tw_osli_alloc_mem() 702 if (bus_dmamap_create(sc->dma_tag, 0, &req->dma_map)) { in tw_osli_alloc_mem() 713 req->ioctl_wake_timeout_lock = &(req->ioctl_wake_timeout_lock_handle); in tw_osli_alloc_mem() 714 mtx_init(req->ioctl_wake_timeout_lock, "tw_ioctl_wake_timeout_lock", NULL, MTX_DEF); in tw_osli_alloc_mem() 717 tw_osli_req_q_insert_tail(req, TW_OSLI_FREE_Q); in tw_osli_alloc_mem() 736 struct tw_osli_req_context *req; in tw_osli_free_resources() local 745 while ((req = tw_osli_req_q_remove_head(sc, TW_OSLI_FREE_Q)) != in tw_osli_free_resources() 747 mtx_destroy(req->ioctl_wake_timeout_lock); in tw_osli_free_resources() [all …]
|
| /freebsd-11-stable/sys/dev/usb/ |
| HD | usb_request.c | 137 usbd_get_debug_bits(struct usb_device *udev, struct usb_device_request *req, in usbd_get_debug_bits() argument 174 if ((temp != req->bmRequestType) && (temp >= 0) && (temp <= 255)) in usbd_get_debug_bits() 179 if ((temp != req->bRequest) && (temp >= 0) && (temp <= 255)) in usbd_get_debug_bits() 226 struct usb_device_request req; in usb_do_clear_stall_callback() local 278 req.bmRequestType = UT_WRITE_ENDPOINT; in usb_do_clear_stall_callback() 279 req.bRequest = UR_CLEAR_FEATURE; in usb_do_clear_stall_callback() 280 USETW(req.wValue, UF_ENDPOINT_HALT); in usb_do_clear_stall_callback() 281 req.wIndex[0] = ep->edesc->bEndpointAddress; in usb_do_clear_stall_callback() 282 req.wIndex[1] = 0; in usb_do_clear_stall_callback() 283 USETW(req.wLength, 0); in usb_do_clear_stall_callback() [all …]
|
| /freebsd-11-stable/sbin/gvinum/ |
| HD | gvinum.c | 141 struct gctl_req *req; in gvinum_attach() local 162 req = gctl_get_handle(); in gvinum_attach() 163 gctl_ro_param(req, "class", -1, "VINUM"); in gvinum_attach() 164 gctl_ro_param(req, "verb", -1, "attach"); in gvinum_attach() 165 gctl_ro_param(req, "child", -1, argv[1]); in gvinum_attach() 166 gctl_ro_param(req, "parent", -1, argv[2]); in gvinum_attach() 167 gctl_ro_param(req, "offset", sizeof(off_t), &offset); in gvinum_attach() 168 gctl_ro_param(req, "rename", sizeof(int), &rename); in gvinum_attach() 169 errstr = gctl_issue(req); in gvinum_attach() 172 gctl_free(req); in gvinum_attach() [all …]
|
| /freebsd-11-stable/sys/geom/mirror/ |
| HD | g_mirror_ctl.c | 88 g_mirror_ctl_configure(struct gctl_req *req, struct g_class *mp) in g_mirror_ctl_configure() argument 99 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_mirror_ctl_configure() 101 gctl_error(req, "No '%s' argument.", "nargs"); in g_mirror_ctl_configure() 105 gctl_error(req, "Invalid number of arguments."); in g_mirror_ctl_configure() 108 name = gctl_get_asciiparam(req, "arg0"); in g_mirror_ctl_configure() 110 gctl_error(req, "No 'arg%u' argument.", 0); in g_mirror_ctl_configure() 113 balancep = gctl_get_asciiparam(req, "balance"); in g_mirror_ctl_configure() 115 gctl_error(req, "No '%s' argument.", "balance"); in g_mirror_ctl_configure() 118 autosync = gctl_get_paraml(req, "autosync", sizeof(*autosync)); in g_mirror_ctl_configure() 120 gctl_error(req, "No '%s' argument.", "autosync"); in g_mirror_ctl_configure() [all …]
|
| /freebsd-11-stable/sys/geom/raid3/ |
| HD | g_raid3_ctl.c | 96 g_raid3_ctl_configure(struct gctl_req *req, struct g_class *mp) in g_raid3_ctl_configure() argument 108 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_raid3_ctl_configure() 110 gctl_error(req, "No '%s' argument.", "nargs"); in g_raid3_ctl_configure() 114 gctl_error(req, "Invalid number of arguments."); in g_raid3_ctl_configure() 117 autosync = gctl_get_paraml(req, "autosync", sizeof(*autosync)); in g_raid3_ctl_configure() 119 gctl_error(req, "No '%s' argument.", "autosync"); in g_raid3_ctl_configure() 122 noautosync = gctl_get_paraml(req, "noautosync", sizeof(*noautosync)); in g_raid3_ctl_configure() 124 gctl_error(req, "No '%s' argument.", "noautosync"); in g_raid3_ctl_configure() 128 gctl_error(req, "'%s' and '%s' specified.", "autosync", in g_raid3_ctl_configure() 132 failsync = gctl_get_paraml(req, "failsync", sizeof(*failsync)); in g_raid3_ctl_configure() [all …]
|
| /freebsd-11-stable/contrib/wpa/src/wps/ |
| HD | http_server.c | 30 void (*cb)(void *ctx, struct http_request *req); 44 struct http_request *req = cookie; in http_request_cb() local 45 struct http_server *srv = req->srv; in http_request_cb() 49 inet_ntoa(req->cli.sin_addr), in http_request_cb() 50 ntohs(req->cli.sin_port)); in http_request_cb() 51 srv->cb(srv->cb_ctx, req); in http_request_cb() 55 "completely", inet_ntoa(req->cli.sin_addr), in http_request_cb() 56 ntohs(req->cli.sin_port)); in http_request_cb() 57 http_request_deinit(req); in http_request_cb() 64 struct http_request *req; in http_request_init() local [all …]
|
| /freebsd-11-stable/contrib/ntp/sntp/libevent/ |
| HD | http.c | 156 #define REQ_VERSION_BEFORE(req, major_v, minor_v) \ argument 157 ((req)->major < (major_v) || \ 158 ((req)->major == (major_v) && (req)->minor < (minor_v))) 160 #define REQ_VERSION_ATLEAST(req, major_v, minor_v) \ argument 161 ((req)->major > (major_v) || \ 162 ((req)->major == (major_v) && (req)->minor >= (minor_v))) 181 struct evhttp_request *req); 183 struct evhttp_request *req); 345 evhttp_response_needs_body(struct evhttp_request *req) in evhttp_response_needs_body() argument 347 return (req->response_code != HTTP_NOCONTENT && in evhttp_response_needs_body() [all …]
|
| /freebsd-11-stable/sys/geom/eli/ |
| HD | g_eli_ctl.c | 54 g_eli_ctl_attach(struct gctl_req *req, struct g_class *mp) in g_eli_ctl_attach() argument 66 nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); in g_eli_ctl_attach() 68 gctl_error(req, "No '%s' argument.", "nargs"); in g_eli_ctl_attach() 72 gctl_error(req, "Invalid number of arguments."); in g_eli_ctl_attach() 76 detach = gctl_get_paraml(req, "detach", sizeof(*detach)); in g_eli_ctl_attach() 78 gctl_error(req, "No '%s' argument.", "detach"); in g_eli_ctl_attach() 84 valp = gctl_get_param(req, "keyno", &dummy); in g_eli_ctl_attach() 86 valp = gctl_get_paraml(req, "keyno", sizeof(*valp)); in g_eli_ctl_attach() 91 gctl_error(req, "Invalid '%s' argument.", "keyno"); in g_eli_ctl_attach() 95 readonly = gctl_get_paraml(req, "readonly", sizeof(*readonly)); in g_eli_ctl_attach() [all …]
|
| /freebsd-11-stable/sbin/ifconfig/ |
| HD | ifbridge.c | 130 struct ifbreq req; in do_bridgeflag() local 132 strlcpy(req.ifbr_ifsname, ifs, sizeof(req.ifbr_ifsname)); in do_bridgeflag() 134 if (do_cmd(sock, BRDGGIFFLGS, &req, sizeof(req), 0) < 0) in do_bridgeflag() 138 req.ifbr_ifsflags |= flag; in do_bridgeflag() 140 req.ifbr_ifsflags &= ~flag; in do_bridgeflag() 142 if (do_cmd(sock, BRDGSIFFLGS, &req, sizeof(req), 1) < 0) in do_bridgeflag() 150 struct ifbreq *req; in bridge_interfaces() local 172 if ((bifc.ifbic_len + sizeof(*req)) < len) in bridge_interfaces() 177 for (i = 0; i < bifc.ifbic_len / sizeof(*req); i++) { in bridge_interfaces() 178 req = bifc.ifbic_req + i; in bridge_interfaces() [all …]
|
| /freebsd-11-stable/sys/dev/sfxge/common/ |
| HD | ef10_nic.c | 49 efx_mcdi_req_t req; in efx_mcdi_get_port_assignment() local 57 req.emr_cmd = MC_CMD_GET_PORT_ASSIGNMENT; in efx_mcdi_get_port_assignment() 58 req.emr_in_buf = payload; in efx_mcdi_get_port_assignment() 59 req.emr_in_length = MC_CMD_GET_PORT_ASSIGNMENT_IN_LEN; in efx_mcdi_get_port_assignment() 60 req.emr_out_buf = payload; in efx_mcdi_get_port_assignment() 61 req.emr_out_length = MC_CMD_GET_PORT_ASSIGNMENT_OUT_LEN; in efx_mcdi_get_port_assignment() 63 efx_mcdi_execute(enp, &req); in efx_mcdi_get_port_assignment() 65 if (req.emr_rc != 0) { in efx_mcdi_get_port_assignment() 66 rc = req.emr_rc; in efx_mcdi_get_port_assignment() 70 if (req.emr_out_length_used < MC_CMD_GET_PORT_ASSIGNMENT_OUT_LEN) { in efx_mcdi_get_port_assignment() [all …]
|
| HD | efx_nvram.c | 509 efx_mcdi_req_t req; in efx_mcdi_nvram_partitions() local 515 req.emr_cmd = MC_CMD_NVRAM_PARTITIONS; in efx_mcdi_nvram_partitions() 516 req.emr_in_buf = payload; in efx_mcdi_nvram_partitions() 517 req.emr_in_length = MC_CMD_NVRAM_PARTITIONS_IN_LEN; in efx_mcdi_nvram_partitions() 518 req.emr_out_buf = payload; in efx_mcdi_nvram_partitions() 519 req.emr_out_length = MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX; in efx_mcdi_nvram_partitions() 521 efx_mcdi_execute(enp, &req); in efx_mcdi_nvram_partitions() 523 if (req.emr_rc != 0) { in efx_mcdi_nvram_partitions() 524 rc = req.emr_rc; in efx_mcdi_nvram_partitions() 528 if (req.emr_out_length_used < MC_CMD_NVRAM_PARTITIONS_OUT_LENMIN) { in efx_mcdi_nvram_partitions() [all …]
|
| /freebsd-11-stable/sys/kern/ |
| HD | kern_sysctl.c | 151 struct sysctl_req *req, struct rm_priotracker *tracker) in sysctl_root_handler_locked() argument 165 error = oid->oid_handler(oid, arg1, arg2, req); in sysctl_root_handler_locked() 188 struct sysctl_req req; in sysctl_load_tunable_by_oid_locked() local 214 memset(&req, 0, sizeof(req)); in sysctl_load_tunable_by_oid_locked() 216 req.td = curthread; in sysctl_load_tunable_by_oid_locked() 217 req.oldfunc = sysctl_old_kernel; in sysctl_load_tunable_by_oid_locked() 218 req.newfunc = sysctl_new_kernel; in sysctl_load_tunable_by_oid_locked() 219 req.lock = REQ_UNWIRED; in sysctl_load_tunable_by_oid_locked() 226 req.newlen = size; in sysctl_load_tunable_by_oid_locked() 227 req.newptr = data; in sysctl_load_tunable_by_oid_locked() [all …]
|
| /freebsd-11-stable/sys/dev/ipmi/ |
| HD | ipmi.c | 63 #define IPMI_INIT_DRIVER_REQUEST(req, addr, cmd, reqlen, replylen) \ argument 64 bzero((req), sizeof(struct ipmi_request)); \ 65 ipmi_init_request((req), NULL, 0, (addr), (cmd), (reqlen), (replylen)) 67 #define IPMI_ALLOC_DRIVER_REQUEST(req, addr, cmd, reqlen, replylen) \ argument 68 (req) = __builtin_alloca(sizeof(struct ipmi_request) + \ 70 IPMI_INIT_DRIVER_REQUEST((req), (addr), (cmd), (reqlen), \ 163 struct ipmi_request *req; in ipmi_purge_completed_requests() local 166 req = TAILQ_FIRST(&dev->ipmi_completed_requests); in ipmi_purge_completed_requests() 167 TAILQ_REMOVE(&dev->ipmi_completed_requests, req, ir_link); in ipmi_purge_completed_requests() 169 ipmi_free_request(req); in ipmi_purge_completed_requests() [all …]
|
| /freebsd-11-stable/sys/dev/tws/ |
| HD | tws_cam.c | 49 static void tws_scsi_complete(struct tws_request *req); 53 void tws_unmap_request(struct tws_softc *sc, struct tws_request *req); 54 int32_t tws_map_request(struct tws_softc *sc, struct tws_request *req); 63 static void tws_freeze_simq(struct tws_softc *sc, struct tws_request *req); 69 static void tws_scsi_err_complete(struct tws_request *req, 71 static void tws_passthru_err_complete(struct tws_request *req, 80 void tws_cmd_complete(struct tws_request *req); 81 void tws_aen_complete(struct tws_request *req); 83 void tws_getset_param_complete(struct tws_request *req); 92 extern void *tws_release_request(struct tws_request *req); [all …]
|
| /freebsd-11-stable/crypto/heimdal/lib/hx509/ |
| HD | req.c | 49 hx509_request_init(hx509_context context, hx509_request *req) in hx509_request_init() argument 51 *req = calloc(1, sizeof(**req)); in hx509_request_init() 52 if (*req == NULL) in hx509_request_init() 59 hx509_request_free(hx509_request *req) in hx509_request_free() argument 61 if ((*req)->name) in hx509_request_free() 62 hx509_name_free(&(*req)->name); in hx509_request_free() 63 free_SubjectPublicKeyInfo(&(*req)->key); in hx509_request_free() 64 free_ExtKeyUsage(&(*req)->eku); in hx509_request_free() 65 free_GeneralNames(&(*req)->san); in hx509_request_free() 66 memset(*req, 0, sizeof(**req)); in hx509_request_free() [all …]
|