| /openbsd/src/usr.sbin/syslogd/ |
| D | parsemsg.c | 34 struct msg * 35 parsemsg(const char *msgstr, struct msg *msg) in parsemsg() argument 39 msg->m_pri = -1; in parsemsg() 40 msgstr += parsemsg_priority(msgstr, &msg->m_pri); in parsemsg() 41 if (msg->m_pri &~ (LOG_FACMASK|LOG_PRIMASK)) in parsemsg() 42 msg->m_pri = -1; in parsemsg() 44 if ((n = parsemsg_timestamp_bsd(msgstr, msg->m_timestamp)) == 0) in parsemsg() 45 n = parsemsg_timestamp_v1(msgstr, msg->m_timestamp); in parsemsg() 51 parsemsg_prog(msgstr, msg->m_prog); in parsemsg() 53 strlcpy(msg->m_msg, msgstr, sizeof(msg->m_msg)); in parsemsg() [all …]
|
| /openbsd/src/usr.sbin/snmpd/ |
| D | snmpe.c | 236 snmpe_parse(struct snmp_message *msg) in snmpe_parse() argument 247 struct sockaddr_storage *ss = &msg->sm_ss; in snmpe_parse() 248 struct ber_element *root = msg->sm_req; in snmpe_parse() 250 msg->sm_errstr = "invalid message"; in snmpe_parse() 253 msg->sm_transactionid = arc4random(); in snmpe_parse() 254 } while (msg->sm_transactionid == 0 || in snmpe_parse() 255 RB_INSERT(snmp_messages, &snmp_messages, msg) != NULL); in snmpe_parse() 261 msg->sm_version = ver; in snmpe_parse() 262 switch (msg->sm_version) { in snmpe_parse() 264 if (!(msg->sm_aflags & ADDRESS_FLAG_SNMPV1)) { in snmpe_parse() [all …]
|
| D | trap.c | 51 struct snmp_message *msg; in trap_send() local 77 if ((msg = calloc(1, sizeof(*msg))) == NULL) in trap_send() 79 msg->sm_sock = snmpd_socket_af(&tr->ta_ss, SOCK_DGRAM); in trap_send() 80 if (msg->sm_sock == -1) { in trap_send() 82 free(msg); in trap_send() 85 memcpy(&(msg->sm_ss), &(tr->ta_ss), sizeof(msg->sm_ss)); in trap_send() 86 msg->sm_slen = tr->ta_ss.ss_len; in trap_send() 88 memcpy(&(msg->sm_local_ss), &(tr->ta_sslocal), in trap_send() 89 sizeof(msg->sm_local_ss)); in trap_send() 90 msg->sm_local_slen = tr->ta_sslocal.ss_len; in trap_send() [all …]
|
| D | usm.c | 263 usm_decode(struct snmp_message *msg, struct ber_element *elm, const char **errp) in usm_decode() argument 283 msg->sm_flags &= SNMP_MSGFLAG_REPORT; in usm_decode() 291 msg->sm_flags &= SNMP_MSGFLAG_REPORT; in usm_decode() 304 msg->sm_flags &= SNMP_MSGFLAG_REPORT; in usm_decode() 315 (saltlen != (MSG_HAS_PRIV(msg) ? SNMP_USM_SALTLEN : 0))) { in usm_decode() 317 msg->sm_flags &= SNMP_MSGFLAG_REPORT; in usm_decode() 324 msg->sm_usmerr = OIDVAL_usmErrEngineId; in usm_decode() 326 msg->sm_flags &= SNMP_MSGFLAG_REPORT; in usm_decode() 330 msg->sm_engine_boots = (u_int32_t)engine_boots; in usm_decode() 331 msg->sm_engine_time = (u_int32_t)engine_time; in usm_decode() [all …]
|
| /openbsd/src/sbin/isakmpd/ |
| D | message.c | 115 struct message *msg; in message_alloc() local 122 msg = calloc(1, sizeof *msg); in message_alloc() 123 if (!msg) in message_alloc() 125 msg->iov = calloc(1, sizeof *msg->iov); in message_alloc() 126 if (!msg->iov) { in message_alloc() 127 message_free(msg); in message_alloc() 130 msg->iov[0].iov_len = sz; in message_alloc() 131 msg->iov[0].iov_base = malloc(sz); in message_alloc() 132 if (!msg->iov[0].iov_base) { in message_alloc() 133 message_free(msg); in message_alloc() [all …]
|
| D | ike_aggressive.c | 81 initiator_send_SA_KE_NONCE_ID(struct message *msg) in initiator_send_SA_KE_NONCE_ID() argument 83 if (ike_phase_1_initiator_send_SA(msg)) in initiator_send_SA_KE_NONCE_ID() 86 if (ike_phase_1_initiator_send_KE_NONCE(msg)) in initiator_send_SA_KE_NONCE_ID() 89 return ike_phase_1_send_ID(msg); in initiator_send_SA_KE_NONCE_ID() 94 initiator_recv_SA_KE_NONCE_ID_AUTH(struct message *msg) in initiator_recv_SA_KE_NONCE_ID_AUTH() argument 96 if (ike_phase_1_initiator_recv_SA(msg)) in initiator_recv_SA_KE_NONCE_ID_AUTH() 99 if (ike_phase_1_initiator_recv_KE_NONCE(msg)) in initiator_recv_SA_KE_NONCE_ID_AUTH() 102 return ike_phase_1_recv_ID_AUTH(msg); in initiator_recv_SA_KE_NONCE_ID_AUTH() 106 initiator_send_AUTH(struct message *msg) in initiator_send_AUTH() argument 108 msg->exchange->flags |= EXCHANGE_FLAG_ENCRYPT; in initiator_send_AUTH() [all …]
|
| /openbsd/src/usr.sbin/ldomctl/ |
| D | ldomctl.c | 430 struct hvctl_msg msg; in guest_start() local 457 bzero(&msg, sizeof(msg)); in guest_start() 458 msg.hdr.op = HVCTL_OP_GUEST_START; in guest_start() 459 msg.hdr.seq = hvctl_seq++; in guest_start() 460 msg.msg.guestop.guestid = gid; in guest_start() 461 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in guest_start() 462 if (nbytes != sizeof(msg)) in guest_start() 465 bzero(&msg, sizeof(msg)); in guest_start() 466 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in guest_start() 467 if (nbytes != sizeof(msg)) in guest_start() [all …]
|
| /openbsd/src/gnu/usr.bin/binutils/gdb/testsuite/gdb.trace/ |
| D | collection.exp | 81 proc run_trace_experiment { msg test_func } { 85 "collect $msg: start trace experiment" 88 "collect $msg: run trace experiment" 91 "collect $msg: stop trace experiment" 94 "collect $msg: tfind test frame" 102 proc gdb_collect_args_test { myargs msg } { argument 113 "collect $msg: set tracepoint" 114 gdb_trace_setactions "collect $msg: define actions" \ 119 run_trace_experiment $msg args_test_func 123 "collect $msg: collected arg char" [all …]
|
| /openbsd/src/lib/libssl/ |
| D | tls13_handshake_msg.c | 39 struct tls13_handshake_msg *msg = NULL; in tls13_handshake_msg_new() local 41 if ((msg = calloc(1, sizeof(struct tls13_handshake_msg))) == NULL) in tls13_handshake_msg_new() 43 if ((msg->buf = tls_buffer_new(0)) == NULL) in tls13_handshake_msg_new() 46 return msg; in tls13_handshake_msg_new() 49 tls13_handshake_msg_free(msg); in tls13_handshake_msg_new() 55 tls13_handshake_msg_free(struct tls13_handshake_msg *msg) in tls13_handshake_msg_free() argument 57 if (msg == NULL) in tls13_handshake_msg_free() 60 tls_buffer_free(msg->buf); in tls13_handshake_msg_free() 62 CBB_cleanup(&msg->cbb); in tls13_handshake_msg_free() 64 freezero(msg->data, msg->data_len); in tls13_handshake_msg_free() [all …]
|
| /openbsd/src/regress/usr.sbin/snmpd/ |
| D | agentx.c | 75 #define MESSAGE_NBO(msg) (((const char *)msg->buf)[2] & NETWORK_BYTE_ORDER) argument 126 struct message msg = {}; in agentx_open_nnbo() local 133 message_add_header(&msg, 1, AGENTX_OPEN_PDU, 0, 0, 0, packetid); in agentx_open_nnbo() 134 message_add_uint8(&msg, 0); in agentx_open_nnbo() 135 message_add(&msg, zero, 3); in agentx_open_nnbo() 136 message_add_oid(&msg, OID_ARG(MIB_SUBAGENT_OPEN, 1), 0); in agentx_open_nnbo() 137 message_add_nstring(&msg, SUBAGENT_DESCR(__func__)); in agentx_open_nnbo() 139 agentx_write(s, &msg); in agentx_open_nnbo() 145 message_release(&msg); in agentx_open_nnbo() 153 struct message msg = {}; in agentx_open_nbo() local [all …]
|
| /openbsd/src/usr.bin/dig/lib/dns/ |
| D | message.c | 169 newbuffer(dns_message_t *msg, unsigned int size) { in newbuffer() argument 178 ISC_LIST_APPEND(msg->scratchpad, dynbuf, link); in newbuffer() 183 currentbuffer(dns_message_t *msg) { in currentbuffer() argument 186 dynbuf = ISC_LIST_TAIL(msg->scratchpad); in currentbuffer() 193 releaserdata(dns_message_t *msg, dns_rdata_t *rdata) { in releaserdata() argument 194 ISC_LIST_PREPEND(msg->freerdata, rdata, link); in releaserdata() 198 newrdata(dns_message_t *msg) { in newrdata() argument 202 rdata = ISC_LIST_HEAD(msg->freerdata); in newrdata() 204 ISC_LIST_UNLINK(msg->freerdata, rdata, link); in newrdata() 208 msgblock = ISC_LIST_TAIL(msg->rdatas); in newrdata() [all …]
|
| /openbsd/src/sys/dev/pci/drm/amd/display/modules/hdcp/ |
| D | hdcp_log.c | 29 void mod_hdcp_dump_binary_message(uint8_t *msg, uint32_t msg_size, in mod_hdcp_dump_binary_message() argument 47 snprintf(&buf[buf_pos], buf_size - buf_pos, "%02X ", msg[i]); in mod_hdcp_dump_binary_message() 57 HDCP_DDC_READ_TRACE(hdcp, "BKSV", hdcp->auth.msg.hdcp1.bksv, in mod_hdcp_log_ddc_trace() 58 sizeof(hdcp->auth.msg.hdcp1.bksv)); in mod_hdcp_log_ddc_trace() 59 HDCP_DDC_READ_TRACE(hdcp, "BCAPS", &hdcp->auth.msg.hdcp1.bcaps, in mod_hdcp_log_ddc_trace() 60 sizeof(hdcp->auth.msg.hdcp1.bcaps)); in mod_hdcp_log_ddc_trace() 62 (uint8_t *)&hdcp->auth.msg.hdcp1.bstatus, in mod_hdcp_log_ddc_trace() 63 sizeof(hdcp->auth.msg.hdcp1.bstatus)); in mod_hdcp_log_ddc_trace() 64 HDCP_DDC_WRITE_TRACE(hdcp, "AN", hdcp->auth.msg.hdcp1.an, in mod_hdcp_log_ddc_trace() 65 sizeof(hdcp->auth.msg.hdcp1.an)); in mod_hdcp_log_ddc_trace() [all …]
|
| D | hdcp_ddc.c | 275 hdcp->auth.msg.hdcp1.bksv, in mod_hdcp_read_bksv() 276 sizeof(hdcp->auth.msg.hdcp1.bksv)); in mod_hdcp_read_bksv() 282 &hdcp->auth.msg.hdcp1.bcaps, in mod_hdcp_read_bcaps() 283 sizeof(hdcp->auth.msg.hdcp1.bcaps)); in mod_hdcp_read_bcaps() 292 (uint8_t *)&hdcp->auth.msg.hdcp1.bstatus, in mod_hdcp_read_bstatus() 296 (uint8_t *)&hdcp->auth.msg.hdcp1.bstatus, in mod_hdcp_read_bstatus() 297 sizeof(hdcp->auth.msg.hdcp1.bstatus)); in mod_hdcp_read_bstatus() 304 (uint8_t *)&hdcp->auth.msg.hdcp1.r0p, in mod_hdcp_read_r0p() 305 sizeof(hdcp->auth.msg.hdcp1.r0p)); in mod_hdcp_read_r0p() 315 hdcp->auth.msg.hdcp1.ksvlist, in mod_hdcp_read_ksvlist() [all …]
|
| /openbsd/src/usr.sbin/smtpd/ |
| D | queue_ram.c | 44 struct qr_message *msg; in get_message() local 46 msg = tree_get(&messages, msgid); in get_message() 47 if (msg == NULL) in get_message() 50 return (msg); in get_message() 56 struct qr_message *msg; in queue_ram_message_create() local 58 msg = calloc(1, sizeof(*msg)); in queue_ram_message_create() 59 if (msg == NULL) { in queue_ram_message_create() 63 tree_init(&msg->envelopes); in queue_ram_message_create() 69 tree_xset(&messages, *msgid, msg); in queue_ram_message_create() 77 struct qr_message *msg; in queue_ram_message_commit() local [all …]
|
| /openbsd/src/gnu/usr.bin/perl/lib/ |
| D | vmsish.t | 53 $msg = do_a_perl('-e "exit 1"'); 54 $msg =~ s/\n/\\n/g; # keep output on one line 55 like($msg, qr/ABORT/, "POSIX ERR exit, DCL error message check"); 58 $msg = do_a_perl('-e "use vmsish qw(exit); exit 1"'); 59 $msg =~ s/\n/\\n/g; # keep output on one line 60 ok(length($msg)==0,"vmsish OK exit, DCL error message check"); 63 $msg = do_a_perl('-e "\&CORE::exit;use vmsish qw(exit);&CORE::exit(1)"'); 64 $msg =~ s/\n/\\n/g; # keep output on one line 65 ok(length($msg)==0,"vmsish OK exit (via &CORE::), DCL err msg check"); 68 $msg = do_a_perl('-e "use vmsish qw(exit); exit 44"'); [all …]
|
| /openbsd/src/sys/dev/usb/ |
| D | if_urndis.c | 253 const struct rndis_init_comp *msg; in urndis_ctrl_handle_init() local 255 msg = (struct rndis_init_comp *) hdr; in urndis_ctrl_handle_init() 261 letoh32(msg->rm_len), in urndis_ctrl_handle_init() 262 letoh32(msg->rm_rid), in urndis_ctrl_handle_init() 263 letoh32(msg->rm_status), in urndis_ctrl_handle_init() 264 letoh32(msg->rm_ver_major), in urndis_ctrl_handle_init() 265 letoh32(msg->rm_ver_minor), in urndis_ctrl_handle_init() 266 letoh32(msg->rm_devflags), in urndis_ctrl_handle_init() 267 letoh32(msg->rm_medium), in urndis_ctrl_handle_init() 268 letoh32(msg->rm_pktmaxcnt), in urndis_ctrl_handle_init() [all …]
|
| /openbsd/src/usr.bin/tmux/ |
| D | file.c | 203 struct msg_write_open msg; in file_vprint() local 215 msg.stream = 1; in file_vprint() 216 msg.fd = STDOUT_FILENO; in file_vprint() 217 msg.flags = 0; in file_vprint() 218 proc_send(c->peer, MSG_WRITE_OPEN, -1, &msg, sizeof msg); in file_vprint() 230 struct msg_write_open msg; in file_print_buffer() local 242 msg.stream = 1; in file_print_buffer() 243 msg.fd = STDOUT_FILENO; in file_print_buffer() 244 msg.flags = 0; in file_print_buffer() 245 proc_send(c->peer, MSG_WRITE_OPEN, -1, &msg, sizeof msg); in file_print_buffer() [all …]
|
| /openbsd/src/usr.sbin/ldomd/ |
| D | ldomd.c | 125 struct hvctl_msg msg; in main() local 164 bzero(&msg, sizeof(msg)); in main() 165 msg.hdr.op = HVCTL_OP_GET_HVCONFIG; in main() 166 msg.hdr.seq = hvctl_seq++; in main() 167 nbytes = write(hvctl_fd, &msg, sizeof(msg)); in main() 168 if (nbytes != sizeof(msg)) in main() 171 bzero(&msg, sizeof(msg)); in main() 172 nbytes = read(hvctl_fd, &msg, sizeof(msg)); in main() 173 if (nbytes != sizeof(msg)) in main() 176 hv_mdpa = msg.msg.hvcnf.hvmdp; in main() [all …]
|
| /openbsd/src/sbin/unwind/libunbound/services/cache/ |
| D | dns.c | 270 struct dns_msg* msg, time_t now) in addr_to_additional() argument 272 if((msg->rep->rrsets[msg->rep->rrset_count] = in addr_to_additional() 274 msg->rep->ar_numrrsets++; in addr_to_additional() 275 msg->rep->rrset_count++; in addr_to_additional() 308 struct dns_msg** msg) in find_add_addrs() argument 321 if(msg) in find_add_addrs() 322 addr_to_additional(akey, region, *msg, now); in find_add_addrs() 341 if(msg) in find_add_addrs() 342 addr_to_additional(akey, region, *msg, now); in find_add_addrs() 434 struct dns_msg* msg, struct delegpt* dp, time_t now) in find_add_ds() argument [all …]
|
| /openbsd/src/usr.sbin/unbound/services/cache/ |
| D | dns.c | 270 struct dns_msg* msg, time_t now) in addr_to_additional() argument 272 if((msg->rep->rrsets[msg->rep->rrset_count] = in addr_to_additional() 274 msg->rep->ar_numrrsets++; in addr_to_additional() 275 msg->rep->rrset_count++; in addr_to_additional() 308 struct dns_msg** msg) in find_add_addrs() argument 321 if(msg) in find_add_addrs() 322 addr_to_additional(akey, region, *msg, now); in find_add_addrs() 341 if(msg) in find_add_addrs() 342 addr_to_additional(akey, region, *msg, now); in find_add_addrs() 434 struct dns_msg* msg, struct delegpt* dp, time_t now) in find_add_ds() argument [all …]
|
| /openbsd/src/sbin/iked/ |
| D | ikev2_pld.c | 103 struct iked_message *msg, size_t offset, size_t left); 105 struct ikev2_payload *pld, struct iked_message *msg); 117 struct iked_message *msg, size_t offset) in ikev2_pld_parse() argument 130 msg->msg_response); in ikev2_pld_parse() 132 if (ibuf_size(msg->msg_data) < betoh32(hdr->ike_length)) { in ikev2_pld_parse() 139 return (ikev2_pld_payloads(env, msg, offset, in ikev2_pld_parse() 144 ikev2_validate_pld(struct iked_message *msg, size_t offset, size_t left, in ikev2_validate_pld() argument 147 uint8_t *msgbuf = ibuf_data(msg->msg_data); in ikev2_validate_pld() 184 ikev2_pld_payloads(struct iked *env, struct iked_message *msg, in ikev2_pld_payloads() argument 190 uint8_t *msgbuf = ibuf_data(msg->msg_data); in ikev2_pld_payloads() [all …]
|
| /openbsd/src/sbin/unwind/libunbound/iterator/ |
| D | iter_resptype.c | 53 response_type_from_cache(struct dns_msg* msg, in response_type_from_cache() argument 57 if(FLAGS_GET_RCODE(msg->rep->flags) == LDNS_RCODE_NXDOMAIN) in response_type_from_cache() 64 if(msg->rep->an_numrrsets > 0) { in response_type_from_cache() 72 for(i=0; i<msg->rep->an_numrrsets; i++) { in response_type_from_cache() 73 struct ub_packed_rrset_key* s = msg->rep->rrsets[i]; in response_type_from_cache() 109 struct dns_msg* msg, struct query_info* request, struct delegpt* dp, in response_type_from_server() argument 116 if(!msg || !request) in response_type_from_server() 120 if((msg->rep->flags & BIT_TC)) in response_type_from_server() 124 if(FLAGS_GET_RCODE(msg->rep->flags) == LDNS_RCODE_NXDOMAIN) { in response_type_from_server() 126 if( (msg->rep->flags&BIT_RA) && in response_type_from_server() [all …]
|
| /openbsd/src/usr.sbin/unbound/iterator/ |
| D | iter_resptype.c | 53 response_type_from_cache(struct dns_msg* msg, in response_type_from_cache() argument 57 if(FLAGS_GET_RCODE(msg->rep->flags) == LDNS_RCODE_NXDOMAIN) in response_type_from_cache() 64 if(msg->rep->an_numrrsets > 0) { in response_type_from_cache() 72 for(i=0; i<msg->rep->an_numrrsets; i++) { in response_type_from_cache() 73 struct ub_packed_rrset_key* s = msg->rep->rrsets[i]; in response_type_from_cache() 109 struct dns_msg* msg, struct query_info* request, struct delegpt* dp, in response_type_from_server() argument 116 if(!msg || !request) in response_type_from_server() 120 if((msg->rep->flags & BIT_TC)) in response_type_from_server() 124 if(FLAGS_GET_RCODE(msg->rep->flags) == LDNS_RCODE_NXDOMAIN) { in response_type_from_server() 126 if( (msg->rep->flags&BIT_RA) && in response_type_from_server() [all …]
|
| /openbsd/src/regress/lib/libedit/readline/ |
| D | history.c | 37 msg(const char *fmt, ...) in msg() function 78 msg("Failed to move beyond the newest entry."); in check_current() 83 msg("%s is NULL.", descr); in check_current() 85 msg("%s is \"%s\" instead of \"%s\".", descr, he->line, want); in check_current() 94 msg("Get %d+%d returned NULL.", history_base, idx); in check_get() 96 msg("Get %d+%d returned line == NULL.", history_base, idx); in check_get() 98 msg("Get %d+%d returned \"%s\" instead of \"%s\".", in check_get() 107 msg(__func__); in test_movement_direction() 121 return msg(NULL); in test_movement_direction() 131 msg(__func__); in test_where() [all …]
|
| /openbsd/src/usr.sbin/bgpctl/ |
| D | mrtparser.c | 103 struct ibuf *msg; in mrt_parse() local 105 while ((msg = mrt_read_msg(fd, &h)) != NULL) { in mrt_parse() 106 if (ibuf_size(msg) != ntohl(h.length)) in mrt_parse() 107 errx(1, "corrupt message, %zu vs %u", ibuf_size(msg), in mrt_parse() 140 if (mrt_parse_dump(&h, msg, &pctx, &r) == 0) { in mrt_parse() 160 pctx = mrt_parse_v2_peer(&h, msg); in mrt_parse() 174 r = mrt_parse_v2_rib(&h, msg, verbose); in mrt_parse() 193 if (mrt_parse_state(&s, &h, msg, in mrt_parse() 207 if (mrt_parse_msg(&m, &h, msg, verbose) != -1) { in mrt_parse() 215 if (mrt_parse_dump_mp(&h, msg, &pctx, &r, in mrt_parse() [all …]
|