| /freebsd/sys/dev/mlx5/mlx5_fpga/ |
| H A D | mlx5fpga_conn.c | 38 #include <dev/mlx5/mlx5_fpga/conn.h> 46 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() [all …]
|
| /freebsd/contrib/wpa/src/tls/ |
| H A D | tlsv1_server_read.c | 23 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 D | tlsv1_client.c | 25 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 D | tlsv1_client_read.c | 22 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 D | tlsv1_server_write.c | 24 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 D | tlsv1_server.c | 24 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 D | tlsv1_client_write.c | 24 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/crypto/openssl/doc/designs/ddd/ |
| H A D | ddd-06-mem-uv.c | 13 typedef void (app_connect_cb)(APP_CONN *conn, int status, void *arg); 14 typedef void (app_write_cb)(APP_CONN *conn, int status, void *arg); 15 typedef void (app_read_cb)(APP_CONN *conn, void *buf, size_t buf_len, void *arg); 18 static void set_timer(APP_CONN *conn); 23 static int handshake_ssl(APP_CONN *conn); 24 static void flush_write_buf(APP_CONN *conn); 25 static void set_rx(APP_CONN *conn); 26 static int try_write(APP_CONN *conn, UPPER_WRITE_OP *op); 27 static void handle_pending_writes(APP_CONN *conn); 28 static int write_deferred(APP_CONN *conn, const void *buf, size_t buf_len, app_write_cb *cb, void *… [all …]
|
| H A D | ddd-02-conn-nonblocking-threads.c | 63 APP_CONN *conn; in new_conn() local 71 conn = calloc(1, sizeof(APP_CONN)); in new_conn() 72 if (conn == NULL) in new_conn() 77 free(conn); in new_conn() 83 free(conn); in new_conn() 90 free(conn); in new_conn() 98 free(conn); in new_conn() 106 free(conn); in new_conn() 113 free(conn); in new_conn() 122 free(conn); in new_conn() [all …]
|
| H A D | ddd-05-mem-nonblocking.c | 63 APP_CONN *conn; local 69 conn = calloc(1, sizeof(APP_CONN)); 70 if (conn == NULL) 73 ssl = conn->ssl = SSL_new(ctx); 75 free(conn); 87 free(conn); 95 free(conn); 101 free(conn); 108 free(conn); 128 conn->ssl_bio = ssl_bio; [all …]
|
| H A D | ddd-02-conn-nonblocking.c | 63 APP_CONN *conn; in new_conn() local 71 conn = calloc(1, sizeof(APP_CONN)); in new_conn() 72 if (conn == NULL) in new_conn() 77 free(conn); in new_conn() 83 free(conn); in new_conn() 103 free(conn); in new_conn() 111 free(conn); in new_conn() 119 free(conn); in new_conn() 126 free(conn); in new_conn() 142 conn->ssl_bio = out; in new_conn() [all …]
|
| H A D | ddd-04-fd-nonblocking.c | 58 APP_CONN *conn; in new_conn() local 64 conn = calloc(1, sizeof(APP_CONN)); in new_conn() 65 if (conn == NULL) in new_conn() 68 ssl = conn->ssl = SSL_new(ctx); in new_conn() 70 free(conn); in new_conn() 78 free(conn); in new_conn() 84 free(conn); in new_conn() 90 free(conn); in new_conn() 99 free(conn); in new_conn() 104 conn->fd = fd; in new_conn() [all …]
|
| /freebsd/contrib/wpa/src/common/ |
| H A D | dpp_tcp.c | 33 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/contrib/openbsm/bin/auditdistd/ |
| H A D | proto.c | 73 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 D | tls_internal.c | 95 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 D | tls_gnutls.c | 157 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 D | tls_wolfssl.c | 339 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 D | tls_none.c | 37 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 D | tls_openssl.c | 758 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 …]
|
| /freebsd/usr.sbin/iscsid/ |
| H A D | iscsid.c | 91 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 D | login.c | 160 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 …]
|
| /freebsd/crypto/openssl/demos/http3/ |
| H A D | ossl-nghttp3.c | 85 void OSSL_DEMO_H3_CONN_free(OSSL_DEMO_H3_CONN *conn) in OSSL_DEMO_H3_CONN_free() argument 87 if (conn == NULL) in OSSL_DEMO_H3_CONN_free() 90 lh_OSSL_DEMO_H3_STREAM_doall(conn->streams, h3_stream_free); in OSSL_DEMO_H3_CONN_free() 92 nghttp3_conn_del(conn->h3conn); in OSSL_DEMO_H3_CONN_free() 93 BIO_free_all(conn->qconn_bio); in OSSL_DEMO_H3_CONN_free() 94 lh_OSSL_DEMO_H3_STREAM_free(conn->streams); in OSSL_DEMO_H3_CONN_free() 95 OPENSSL_free(conn); in OSSL_DEMO_H3_CONN_free() 98 static OSSL_DEMO_H3_STREAM *h3_conn_create_stream(OSSL_DEMO_H3_CONN *conn, int type) in h3_conn_create_stream() argument 109 if ((s->s = SSL_new_stream(conn->qconn, flags)) == NULL) { in h3_conn_create_stream() 116 lh_OSSL_DEMO_H3_STREAM_insert(conn->streams, s); in h3_conn_create_stream() [all …]
|
| /freebsd/crypto/openssl/ssl/quic/ |
| H A D | quic_lcidm.c | 40 QUIC_LCIDM_CONN *conn; member 93 static unsigned long lcidm_conn_hash(const QUIC_LCIDM_CONN *conn) in lcidm_conn_hash() argument 95 return (unsigned long)(uintptr_t)conn->opaque; in lcidm_conn_hash() 138 static void lcidm_delete_conn(QUIC_LCIDM *lcidm, QUIC_LCIDM_CONN *conn); 140 static void lcidm_delete_conn_(QUIC_LCIDM_CONN *conn, void *arg) in lcidm_delete_conn_() argument 142 lcidm_delete_conn((QUIC_LCIDM *)arg, conn); in lcidm_delete_conn_() 200 QUIC_LCIDM_CONN *conn = lcidm_get0_conn(lcidm, opaque); in lcidm_upsert_conn() local 202 if (conn != NULL) in lcidm_upsert_conn() 203 return conn; in lcidm_upsert_conn() 205 if ((conn = OPENSSL_zalloc(sizeof(*conn))) == NULL) in lcidm_upsert_conn() [all …]
|
| /freebsd/sbin/ggate/ggated/ |
| H A D | ggated.c | 344 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/tools/tools/netrate/tcpp/ |
| H A D | tcpp_server.c | 77 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() 98 * Register to read on the socket, and set our conn pointer as the 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 [all …]
|