Home
last modified time | relevance | path

Searched refs:conn (Results 1 – 25 of 179) sorted by relevance

12345678

/freebsd/contrib/wpa/src/tls/
H A Dtlsv1_server_read.c23 static int tls_process_client_key_exchange(struct tlsv1_server *conn, u8 ct,
25 static int tls_process_change_cipher_spec(struct tlsv1_server *conn,
30 static int testing_cipher_suite_filter(struct tlsv1_server *conn, u16 suite) in testing_cipher_suite_filter() argument
33 if ((conn->test_flags & in testing_cipher_suite_filter()
49 static void tls_process_status_request_item(struct tlsv1_server *conn, in tls_process_status_request_item() argument
86 conn->status_request_multi = 1; in tls_process_status_request_item()
90 static void tls_process_status_request_v2(struct tlsv1_server *conn, in tls_process_status_request_v2() argument
95 conn->status_request_v2 = 1; in tls_process_status_request_v2()
115 tls_process_status_request_item(conn, pos, len); in tls_process_status_request_v2()
121 static int tls_process_client_hello(struct tlsv1_server *conn, u8 ct, in tls_process_client_hello() argument
[all …]
H A Dtlsv1_client.c25 void tls_alert(struct tlsv1_client *conn, u8 level, u8 description) in tls_alert() argument
27 conn->alert_level = level; in tls_alert()
28 conn->alert_description = description; in tls_alert()
32 void tlsv1_client_free_dh(struct tlsv1_client *conn) in tlsv1_client_free_dh() argument
34 os_free(conn->dh_p); in tlsv1_client_free_dh()
35 os_free(conn->dh_g); in tlsv1_client_free_dh()
36 os_free(conn->dh_ys); in tlsv1_client_free_dh()
37 conn->dh_p = conn->dh_g = conn->dh_ys = NULL; in tlsv1_client_free_dh()
41 u16 tls_client_highest_ver(struct tlsv1_client *conn) in tls_client_highest_ver() argument
47 if ((conn->flags & TLS_CONN_DISABLE_TLSv1_2) && in tls_client_highest_ver()
[all …]
H A Dtlsv1_server.c24 void tlsv1_server_log(struct tlsv1_server *conn, const char *fmt, ...) in tlsv1_server_log() argument
42 if (conn->log_cb) in tlsv1_server_log()
43 conn->log_cb(conn->log_cb_ctx, buf); in tlsv1_server_log()
49 void tlsv1_server_alert(struct tlsv1_server *conn, u8 level, u8 description) in tlsv1_server_alert() argument
51 conn->alert_level = level; in tlsv1_server_alert()
52 conn->alert_description = description; in tlsv1_server_alert()
56 int tlsv1_server_derive_keys(struct tlsv1_server *conn, in tlsv1_server_derive_keys() argument
68 os_memcpy(seed, conn->client_random, TLS_RANDOM_LEN); in tlsv1_server_derive_keys()
69 os_memcpy(seed + TLS_RANDOM_LEN, conn->server_random, in tlsv1_server_derive_keys()
71 if (tls_prf(conn->rl.tls_version, in tlsv1_server_derive_keys()
[all …]
H A Dtlsv1_server_write.c24 static size_t tls_server_cert_chain_der_len(struct tlsv1_server *conn) in tls_server_cert_chain_der_len() argument
29 cert = conn->cred ? conn->cred->cert : NULL; in tls_server_cert_chain_der_len()
34 cert = x509_certificate_get_subject(conn->cred->trusted_certs, in tls_server_cert_chain_der_len()
42 static int tls_write_server_hello(struct tlsv1_server *conn, in tls_write_server_hello() argument
51 tlsv1_server_log(conn, "Send ServerHello"); in tls_write_server_hello()
59 WPA_PUT_BE32(conn->server_random, now.sec); in tls_write_server_hello()
60 if (random_get_bytes(conn->server_random + 4, TLS_RANDOM_LEN - 4)) { in tls_write_server_hello()
66 conn->server_random, TLS_RANDOM_LEN); in tls_write_server_hello()
68 conn->session_id_len = TLS_SESSION_ID_MAX_LEN; in tls_write_server_hello()
69 if (random_get_bytes(conn->session_id, conn->session_id_len)) { in tls_write_server_hello()
[all …]
H A Dtlsv1_client_read.c22 static int tls_process_server_key_exchange(struct tlsv1_client *conn, u8 ct,
24 static int tls_process_certificate_request(struct tlsv1_client *conn, u8 ct,
26 static int tls_process_server_hello_done(struct tlsv1_client *conn, u8 ct,
30 static int tls_version_disabled(struct tlsv1_client *conn, u16 ver) in tls_version_disabled() argument
32 return (((conn->flags & TLS_CONN_DISABLE_TLSv1_0) && in tls_version_disabled()
34 ((conn->flags & TLS_CONN_DISABLE_TLSv1_1) && in tls_version_disabled()
36 ((conn->flags & TLS_CONN_DISABLE_TLSv1_2) && in tls_version_disabled()
41 static int tls_process_server_hello_extensions(struct tlsv1_client *conn, in tls_process_server_hello_extensions() argument
78 static int tls_process_server_hello(struct tlsv1_client *conn, u8 ct, in tls_process_server_hello() argument
89 tls_alert(conn, TLS_ALERT_LEVEL_FATAL, in tls_process_server_hello()
[all …]
H A Dtlsv1_client_write.c24 static size_t tls_client_cert_chain_der_len(struct tlsv1_client *conn) in tls_client_cert_chain_der_len() argument
29 if (conn->cred == NULL) in tls_client_cert_chain_der_len()
32 cert = conn->cred->cert; in tls_client_cert_chain_der_len()
37 cert = x509_certificate_get_subject(conn->cred->trusted_certs, in tls_client_cert_chain_der_len()
45 u8 * tls_send_client_hello(struct tlsv1_client *conn, size_t *out_len) in tls_send_client_hello() argument
51 u16 tls_version = tls_client_highest_ver(conn); in tls_send_client_hello()
66 WPA_PUT_BE32(conn->client_random, now.sec); in tls_send_client_hello()
67 if (random_get_bytes(conn->client_random + 4, TLS_RANDOM_LEN - 4)) { in tls_send_client_hello()
73 conn->client_random, TLS_RANDOM_LEN); in tls_send_client_hello()
75 len = 150 + conn->num_cipher_suites * 2 + conn->client_hello_ext_len; in tls_send_client_hello()
[all …]
/freebsd/contrib/wpa/src/common/
H A Ddpp_tcp.c33 int (*pkex_done)(void *ctx, void *conn, struct dpp_bootstrap_info *bi);
69 struct dl_list conn; /* struct dpp_connection */ member
78 struct dl_list conn; /* struct dpp_connection */ member
92 static void dpp_controller_auth_success(struct dpp_connection *conn,
102 static void dpp_connection_free(struct dpp_connection *conn) in dpp_connection_free() argument
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()
[all …]
/freebsd/sys/dev/mlx5/mlx5_fpga/
H A Dmlx5fpga_conn.c46 static int mlx5_fpga_conn_map_buf(struct mlx5_fpga_conn *conn, in mlx5_fpga_conn_map_buf() argument
55 dma_device = &conn->fdev->mdev->pdev->dev; in mlx5_fpga_conn_map_buf()
60 mlx5_fpga_warn(conn->fdev, "DMA error on sg 0: %d\n", err); in mlx5_fpga_conn_map_buf()
72 mlx5_fpga_warn(conn->fdev, "DMA error on sg 1: %d\n", err); in mlx5_fpga_conn_map_buf()
82 static void mlx5_fpga_conn_unmap_buf(struct mlx5_fpga_conn *conn, in mlx5_fpga_conn_unmap_buf() argument
87 dma_device = &conn->fdev->mdev->pdev->dev; in mlx5_fpga_conn_unmap_buf()
97 static int mlx5_fpga_conn_post_recv(struct mlx5_fpga_conn *conn, in mlx5_fpga_conn_post_recv() argument
104 err = mlx5_fpga_conn_map_buf(conn, buf); in mlx5_fpga_conn_post_recv()
108 if (unlikely(conn->qp.rq.pc - conn->qp.rq.cc >= conn->qp.rq.size)) { in mlx5_fpga_conn_post_recv()
109 mlx5_fpga_conn_unmap_buf(conn, buf); in mlx5_fpga_conn_post_recv()
[all …]
/freebsd/usr.sbin/iscsid/
H A Discsid.c91 struct iscsid_connection *conn; in pdu_receive_proxy() local
96 conn = (struct iscsid_connection *)pdu->pdu_connection; in pdu_receive_proxy()
97 assert(conn->conn_conf.isc_iser != 0); in pdu_receive_proxy()
99 pdu->pdu_data = malloc(conn->conn.conn_max_recv_data_segment_length); in pdu_receive_proxy()
104 idr.idr_session_id = conn->conn_session_id; in pdu_receive_proxy()
106 idr.idr_data_segment_len = conn->conn.conn_max_recv_data_segment_length; in pdu_receive_proxy()
109 error = ioctl(conn->conn_iscsi_fd, ISCSIDRECEIVE, &idr); in pdu_receive_proxy()
118 assert(len <= (size_t)conn->conn.conn_max_recv_data_segment_length); in pdu_receive_proxy()
125 struct iscsid_connection *conn; in pdu_send_proxy() local
129 conn = (struct iscsid_connection *)pdu->pdu_connection; in pdu_send_proxy()
[all …]
H A Dlogin.c160 kernel_modify(const struct iscsid_connection *conn, const char *target_address) in kernel_modify() argument
166 ism.ism_session_id = conn->conn_session_id; in kernel_modify()
167 memcpy(&ism.ism_conf, &conn->conn_conf, sizeof(ism.ism_conf)); in kernel_modify()
170 error = ioctl(conn->conn_iscsi_fd, ISCSISMODIFY, &ism); in kernel_modify()
188 login_handle_redirection(struct iscsid_connection *conn, struct pdu *response) in login_handle_redirection() argument
206 sizeof(conn->conn_conf.isc_target_addr) - 1) in login_handle_redirection()
210 kernel_modify(conn, target_address); in login_handle_redirection()
215 login_receive(struct connection *conn) in login_receive() argument
222 response = pdu_new(conn); in login_receive()
241 login_handle_redirection((struct iscsid_connection *)conn, in login_receive()
[all …]
H A Ddiscovery.c42 logout_receive(struct connection *conn) in logout_receive() argument
47 response = pdu_new(conn); in logout_receive()
56 if (ntohl(bhslr->bhslr_statsn) != conn->conn_statsn + 1) { in logout_receive()
59 conn->conn_statsn + 1); in logout_receive()
61 conn->conn_statsn = ntohl(bhslr->bhslr_statsn); in logout_receive()
67 logout_new_request(struct connection *conn) in logout_new_request() argument
72 request = pdu_new(conn); in logout_new_request()
80 bhslr->bhslr_expstatsn = htonl(conn->conn_statsn + 1); in logout_new_request()
86 kernel_add(const struct iscsid_connection *conn, const char *target) in kernel_add() argument
92 memcpy(&isa.isa_conf, &conn->conn_conf, sizeof(isa.isa_conf)); in kernel_add()
[all …]
/freebsd/contrib/openbsm/bin/auditdistd/
H A Dproto.c73 struct proto_conn *conn; in proto_alloc() local
80 conn = malloc(sizeof(*conn)); in proto_alloc()
81 if (conn != NULL) { in proto_alloc()
82 conn->pc_proto = proto; in proto_alloc()
83 conn->pc_side = side; in proto_alloc()
84 conn->pc_magic = PROTO_CONN_MAGIC; in proto_alloc()
86 return (conn); in proto_alloc()
90 proto_free(struct proto_conn *conn) in proto_free() argument
93 PJDLOG_ASSERT(conn != NULL); in proto_free()
94 PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); in proto_free()
[all …]
/freebsd/contrib/wpa/src/crypto/
H A Dtls_internal.c95 struct tls_connection *conn; in tls_connection_init() local
98 conn = os_zalloc(sizeof(*conn)); in tls_connection_init()
99 if (conn == NULL) in tls_connection_init()
101 conn->global = global; in tls_connection_init()
105 conn->client = tlsv1_client_init(); in tls_connection_init()
106 if (conn->client == NULL) { in tls_connection_init()
107 os_free(conn); in tls_connection_init()
110 tlsv1_client_set_cb(conn->client, global->event_cb, in tls_connection_init()
116 conn->server = tlsv1_server_init(global->server_cred); in tls_connection_init()
117 if (conn->server == NULL) { in tls_connection_init()
[all …]
H A Dtls_gnutls.c157 struct tls_connection *conn = (struct tls_connection *) ptr; in tls_pull_func() local
159 if (conn->pull_buf == NULL) { in tls_pull_func()
164 end = wpabuf_head_u8(conn->pull_buf) + wpabuf_len(conn->pull_buf); in tls_pull_func()
165 if ((size_t) (end - conn->pull_buf_offset) < len) in tls_pull_func()
166 len = end - conn->pull_buf_offset; in tls_pull_func()
167 os_memcpy(buf, conn->pull_buf_offset, len); in tls_pull_func()
168 conn->pull_buf_offset += len; in tls_pull_func()
169 if (conn->pull_buf_offset == end) { in tls_pull_func()
171 wpabuf_free(conn->pull_buf); in tls_pull_func()
172 conn->pull_buf = NULL; in tls_pull_func()
[all …]
H A Dtls_wolfssl.c339 struct tls_connection *conn; in tls_connection_init() local
343 conn = os_zalloc(sizeof(*conn)); in tls_connection_init()
344 if (!conn) in tls_connection_init()
346 conn->ssl = wolfSSL_new(ssl_ctx); in tls_connection_init()
347 if (!conn->ssl) { in tls_connection_init()
348 os_free(conn); in tls_connection_init()
352 wolfSSL_SetIOReadCtx(conn->ssl, &conn->input); in tls_connection_init()
353 wolfSSL_SetIOWriteCtx(conn->ssl, &conn->output); in tls_connection_init()
354 wolfSSL_set_ex_data(conn->ssl, 0, conn); in tls_connection_init()
355 conn->context = wolfSSL_CTX_get_ex_data(ssl_ctx, 0); in tls_connection_init()
[all …]
H A Dtls_none.c37 void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn) in tls_connection_deinit() argument
42 int tls_connection_established(void *tls_ctx, struct tls_connection *conn) in tls_connection_established() argument
49 struct tls_connection *conn) in tls_connection_peer_serial_num() argument
55 int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn) in tls_connection_shutdown() argument
61 int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn, in tls_connection_set_params() argument
81 int tls_connection_set_verify(void *tls_ctx, struct tls_connection *conn, in tls_connection_set_verify() argument
89 int tls_connection_get_random(void *tls_ctx, struct tls_connection *conn, in tls_connection_get_random() argument
96 int tls_connection_export_key(void *tls_ctx, struct tls_connection *conn, in tls_connection_export_key() argument
104 int tls_connection_get_eap_fast_key(void *tls_ctx, struct tls_connection *conn, in tls_connection_get_eap_fast_key() argument
112 struct tls_connection *conn, in tls_connection_handshake() argument
[all …]
H A Dtls_openssl.c758 struct tls_connection *conn = SSL_get_app_data((SSL *) ssl); in ssl_info_cb() local
767 conn->read_alerts++; in ssl_info_cb()
769 conn->write_alerts++; in ssl_info_cb()
771 if (conn->context->event_cb != NULL) { in ssl_info_cb()
773 struct tls_context *context = conn->context; in ssl_info_cb()
1261 static int tls_engine_init(struct tls_connection *conn, const char *engine_id, in tls_engine_init() argument
1271 conn->engine = NULL; in tls_engine_init()
1272 conn->private_key = EVP_PKEY_from_keystore(key_id); in tls_engine_init()
1273 if (!conn->private_key) { in tls_engine_init()
1293 conn->engine = ENGINE_by_id(engine_id); in tls_engine_init()
[all …]
H A Dtls.h274 void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn);
282 int tls_connection_established(void *tls_ctx, struct tls_connection *conn);
294 struct tls_connection *conn);
307 int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn);
329 tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
371 struct tls_connection *conn,
385 struct tls_connection *conn,
404 struct tls_connection *conn,
423 struct tls_connection *conn,
454 struct tls_connection *conn,
[all …]
/freebsd/usr.sbin/ctld/
H A Dlogin.c148 login_receive(struct connection *conn, bool initial) in login_receive() argument
153 request = pdu_new(conn); in login_receive()
189 ISCSI_SNLT(ntohl(bhslr->bhslr_cmdsn), conn->conn_cmdsn)) { in login_receive()
192 "was %u, is %u", conn->conn_cmdsn, in login_receive()
196 ntohl(bhslr->bhslr_expstatsn) != conn->conn_statsn) { in login_receive()
200 conn->conn_statsn); in login_receive()
202 conn->conn_cmdsn = ntohl(bhslr->bhslr_cmdsn); in login_receive()
211 struct connection *conn; in login_new_response() local
216 conn = request->pdu_connection; in login_new_response()
225 bhslr2->bhslr_statsn = htonl(conn->conn_statsn++); in login_new_response()
[all …]
/freebsd/tools/tools/netrate/tcpp/
H A Dtcpp_server.c77 struct connection *conn; in tcpp_server_newconn() local
90 conn = malloc(sizeof(*conn)); in tcpp_server_newconn()
91 if (conn == NULL) in tcpp_server_newconn()
93 bzero(conn, sizeof(*conn)); in tcpp_server_newconn()
94 conn->conn_magic = CONNECTION_MAGIC; in tcpp_server_newconn()
95 conn->conn_fd = fd; in tcpp_server_newconn()
101 EV_SET(&kev, fd, EVFILT_READ, EV_ADD, 0, 0, conn); in tcpp_server_newconn()
105 return (conn); in tcpp_server_newconn()
109 tcpp_server_closeconn(struct connection *conn) in tcpp_server_closeconn() argument
119 close(conn->conn_fd); in tcpp_server_closeconn()
[all …]
H A Dtcpp_client.c85 struct connection *conn; in tcpp_client_newconn() local
125 conn = malloc(sizeof(*conn)); in tcpp_client_newconn()
126 if (conn == NULL) in tcpp_client_newconn()
128 bzero(conn, sizeof(*conn)); in tcpp_client_newconn()
129 conn->conn_magic = CONNECTION_MAGIC; in tcpp_client_newconn()
130 conn->conn_fd = fd; in tcpp_client_newconn()
131 conn->conn_header.th_magic = TCPP_MAGIC; in tcpp_client_newconn()
132 conn->conn_header.th_len = payload_len; in tcpp_client_newconn()
133 tcpp_header_encode(&conn->conn_header); in tcpp_client_newconn()
135 EV_SET(&kev, fd, EVFILT_WRITE, EV_ADD, 0, 0, conn); in tcpp_client_newconn()
[all …]
/freebsd/sbin/ggate/ggated/
H A Dggated.c344 struct ggd_connection *conn) in exports_check() argument
362 conn->c_flags |= GGATE_FLAG_RDONLY; in exports_check()
371 conn->c_flags |= GGATE_FLAG_WRONLY; in exports_check()
393 conn->c_flags |= GGATE_FLAG_DIRECT; in exports_check()
402 if ((conn->c_flags & GGATE_FLAG_RDONLY) != 0) in exports_check()
404 else if ((conn->c_flags & GGATE_FLAG_WRONLY) != 0) in exports_check()
409 if (conn->c_diskfd != -1) { in exports_check()
410 if (strcmp(conn->c_path, ex->e_path) != 0) { in exports_check()
413 conn->c_path, ex->e_path); in exports_check()
419 conn->c_diskfd = open(ex->e_path, flags); in exports_check()
[all …]
/freebsd/contrib/lib9p/
H A Drequest.c192 struct l9p_connection *conn; in l9p_dispatch_request() local
200 conn = req->lr_conn; in l9p_dispatch_request()
203 handlers = l9p_versions[conn->lc_version].handlers; in l9p_dispatch_request()
204 n = (size_t)l9p_versions[conn->lc_version].n_handlers; in l9p_dispatch_request()
219 l9p_describe_fcall(&req->lr_req, conn->lc_version, sb); in l9p_dispatch_request()
363 struct l9p_connection *conn = req->lr_conn; in l9p_respond() local
377 if (conn->lc_version == L9P_2000L) { in l9p_respond()
389 l9p_describe_fcall(&req->lr_resp, conn->lc_version, sb); in l9p_respond()
412 l9p_pufcall(&req->lr_resp_msg, &req->lr_resp, conn->lc_version); in l9p_respond()
414 ht_remove(&conn->lc_requests, req->lr_req.hdr.tag); in l9p_respond()
[all …]
H A Dconnection.c56 l9p_connection_init(struct l9p_server *server, struct l9p_connection **conn) in l9p_connection_init() argument
61 assert(conn != NULL); in l9p_connection_init()
75 *conn = newconn; in l9p_connection_init()
81 l9p_connection_free(struct l9p_connection *conn) in l9p_connection_free() argument
84 LIST_REMOVE(conn, lc_link); in l9p_connection_free()
85 free(conn); in l9p_connection_free()
89 l9p_connection_recv(struct l9p_connection *conn, const struct iovec *iov, in l9p_connection_recv() argument
97 req->lr_conn = conn; in l9p_connection_recv()
105 if (l9p_pufcall(&req->lr_req_msg, &req->lr_req, conn->lc_version) != 0) { in l9p_connection_recv()
112 if (ht_add(&conn->lc_requests, req->lr_req.hdr.tag, req)) { in l9p_connection_recv()
[all …]
/freebsd/contrib/unbound/services/
H A Dlisten_dnsport.c3326 struct doq_conn* conn; in conn_tree_del() local
3329 conn = (struct doq_conn*)node->key; in conn_tree_del()
3330 if(conn->timer.timer_in_list) { in conn_tree_del()
3334 doq_timer_list_remove(conn->table, &conn->timer); in conn_tree_del()
3336 if(conn->timer.timer_in_tree) in conn_tree_del()
3337 doq_timer_tree_remove(conn->table, &conn->timer); in conn_tree_del()
3338 doq_table_quic_size_subtract(table, sizeof(*conn)+conn->key.dcidlen); in conn_tree_del()
3339 doq_conn_delete(conn, table); in conn_tree_del()
3485 if(verbosity >= VERB_ALGO && timer->conn) { in doq_timer_set()
3488 addr_to_str((void*)&timer->conn->key.paddr.addr, in doq_timer_set()
[all …]

12345678