Home
last modified time | relevance | path

Searched full:conn (Results 1 – 25 of 675) sorted by relevance

12345678910>>...27

/openbmc/linux/net/smc/
H A Dsmc_cdc.c30 struct smc_connection *conn = cdcpend->conn; in smc_cdc_tx_handler() local
35 sndbuf_desc = conn->sndbuf_desc; in smc_cdc_tx_handler()
36 smc = container_of(conn, struct smc_sock, conn); in smc_cdc_tx_handler()
40 &cdcpend->conn->tx_curs_fin, in smc_cdc_tx_handler()
44 atomic_add(diff, &cdcpend->conn->sndbuf_space); in smc_cdc_tx_handler()
47 smc_curs_copy(&conn->tx_curs_fin, &cdcpend->cursor, conn); in smc_cdc_tx_handler()
48 smc_curs_copy(&conn->local_tx_ctrl_fin, &cdcpend->p_cursor, in smc_cdc_tx_handler()
49 conn); in smc_cdc_tx_handler()
50 conn->tx_cdc_seq_fin = cdcpend->ctrl_seq; in smc_cdc_tx_handler()
53 if (atomic_dec_and_test(&conn->cdc_pend_tx_wr)) { in smc_cdc_tx_handler()
[all …]
H A Dsmc_tx.c48 if (atomic_read(&smc->conn.sndbuf_space) && sock) { in smc_tx_write_space()
50 SMC_STAT_RMB_TX_FULL(smc, !smc->conn.lnk); in smc_tx_write_space()
80 struct smc_connection *conn = &smc->conn; in smc_tx_wait() local
92 conn->killed || in smc_tx_wait()
93 conn->local_tx_ctrl.conn_state_flags.peer_done_writing) { in smc_tx_wait()
97 if (smc_cdc_rxed_any_close(conn)) { in smc_tx_wait()
112 if (atomic_read(&conn->sndbuf_space) && !conn->urg_tx_pend) in smc_tx_wait()
118 smc_cdc_rxed_any_close(conn) || in smc_tx_wait()
119 (atomic_read(&conn->sndbuf_space) && in smc_tx_wait()
120 !conn->urg_tx_pend), in smc_tx_wait()
[all …]
H A Dsmc_rx.c53 * @conn connection to update
62 struct smc_connection *conn = &smc->conn; in smc_rx_update_consumer() local
67 smc_curs_add(conn->rmb_desc->len, &cons, len); in smc_rx_update_consumer()
70 if (conn->urg_state == SMC_URG_VALID || conn->urg_rx_skip_pend) { in smc_rx_update_consumer()
71 diff = smc_curs_comp(conn->rmb_desc->len, &cons, in smc_rx_update_consumer()
72 &conn->urg_curs); in smc_rx_update_consumer()
77 conn->urg_state = SMC_URG_READ; in smc_rx_update_consumer()
83 smc_curs_add(conn->rmb_desc->len, &cons, 1); in smc_rx_update_consumer()
84 conn->urg_rx_skip_pend = false; in smc_rx_update_consumer()
87 conn->urg_state = SMC_URG_READ; in smc_rx_update_consumer()
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/fpga/
H A Dconn.c40 #include "fpga/conn.h"
48 static int mlx5_fpga_conn_map_buf(struct mlx5_fpga_conn *conn, in mlx5_fpga_conn_map_buf() argument
57 dma_device = mlx5_core_dma_dev(conn->fdev->mdev); in mlx5_fpga_conn_map_buf()
62 mlx5_fpga_warn(conn->fdev, "DMA error on sg 0: %d\n", err); in mlx5_fpga_conn_map_buf()
74 mlx5_fpga_warn(conn->fdev, "DMA error on sg 1: %d\n", err); in mlx5_fpga_conn_map_buf()
84 static void mlx5_fpga_conn_unmap_buf(struct mlx5_fpga_conn *conn, in mlx5_fpga_conn_unmap_buf() argument
89 dma_device = mlx5_core_dma_dev(conn->fdev->mdev); in mlx5_fpga_conn_unmap_buf()
99 static int mlx5_fpga_conn_post_recv(struct mlx5_fpga_conn *conn, in mlx5_fpga_conn_post_recv() argument
106 err = mlx5_fpga_conn_map_buf(conn, buf); in mlx5_fpga_conn_post_recv()
110 if (unlikely(conn->qp.rq.pc - conn->qp.rq.cc >= conn->qp.rq.size)) { in mlx5_fpga_conn_post_recv()
[all …]
/openbmc/linux/fs/smb/server/
H A Dconnection.c28 * @conn: connection instance to be cleand up
30 * During the thread termination, the corresponding conn instance
31 * resources(sock/memory) are released and finally the conn object is freed.
33 void ksmbd_conn_free(struct ksmbd_conn *conn) in ksmbd_conn_free() argument
36 list_del(&conn->conns_list); in ksmbd_conn_free()
39 xa_destroy(&conn->sessions); in ksmbd_conn_free()
40 kvfree(conn->request_buf); in ksmbd_conn_free()
41 kfree(conn->preauth_info); in ksmbd_conn_free()
42 if (atomic_dec_and_test(&conn->refcnt)) in ksmbd_conn_free()
43 kfree(conn); in ksmbd_conn_free()
[all …]
/openbmc/linux/net/rxrpc/
H A Dconn_object.c26 void rxrpc_poke_conn(struct rxrpc_connection *conn, enum rxrpc_conn_trace why) in rxrpc_poke_conn() argument
28 struct rxrpc_local *local = conn->local; in rxrpc_poke_conn()
35 busy = !list_empty(&conn->attend_link); in rxrpc_poke_conn()
37 rxrpc_get_connection(conn, why); in rxrpc_poke_conn()
38 list_add_tail(&conn->attend_link, &local->conn_attend_q); in rxrpc_poke_conn()
46 struct rxrpc_connection *conn = in rxrpc_connection_timer() local
49 rxrpc_poke_conn(conn, rxrpc_conn_get_poke_timer); in rxrpc_connection_timer()
58 struct rxrpc_connection *conn; in rxrpc_alloc_connection() local
62 conn = kzalloc(sizeof(struct rxrpc_connection), gfp); in rxrpc_alloc_connection()
63 if (conn) { in rxrpc_alloc_connection()
[all …]
H A Dconn_event.c22 static bool rxrpc_set_conn_aborted(struct rxrpc_connection *conn, struct sk_buff *skb, in rxrpc_set_conn_aborted() argument
28 if (conn->state != RXRPC_CONN_ABORTED) { in rxrpc_set_conn_aborted()
29 spin_lock(&conn->state_lock); in rxrpc_set_conn_aborted()
30 if (conn->state != RXRPC_CONN_ABORTED) { in rxrpc_set_conn_aborted()
31 conn->abort_code = abort_code; in rxrpc_set_conn_aborted()
32 conn->error = err; in rxrpc_set_conn_aborted()
33 conn->completion = compl; in rxrpc_set_conn_aborted()
35 smp_store_release(&conn->state, RXRPC_CONN_ABORTED); in rxrpc_set_conn_aborted()
36 set_bit(RXRPC_CONN_DONT_REUSE, &conn->flags); in rxrpc_set_conn_aborted()
37 set_bit(RXRPC_CONN_EV_ABORT_CALLS, &conn->events); in rxrpc_set_conn_aborted()
[all …]
H A Dconn_client.c46 struct rxrpc_connection *conn) in rxrpc_put_client_connection_id() argument
48 idr_remove(&local->conn_ids, conn->proto.cid >> RXRPC_CIDSHIFT); in rxrpc_put_client_connection_id()
56 struct rxrpc_connection *conn; in rxrpc_destroy_client_conn_ids() local
60 idr_for_each_entry(&local->conn_ids, conn, id) { in rxrpc_destroy_client_conn_ids()
61 pr_err("AF_RXRPC: Leaked client conn %p {%d}\n", in rxrpc_destroy_client_conn_ids()
62 conn, refcount_read(&conn->ref)); in rxrpc_destroy_client_conn_ids()
147 struct rxrpc_connection *conn; in rxrpc_alloc_client_connection() local
154 conn = rxrpc_alloc_connection(rxnet, GFP_ATOMIC | __GFP_NOWARN); in rxrpc_alloc_client_connection()
155 if (!conn) in rxrpc_alloc_client_connection()
158 id = idr_alloc_cyclic(&local->conn_ids, conn, 1, 0x40000000, in rxrpc_alloc_client_connection()
[all …]
H A Dconn_service.c24 struct rxrpc_connection *conn = NULL; in rxrpc_find_service_conn_rcu() local
43 conn = rb_entry(p, struct rxrpc_connection, service_node); in rxrpc_find_service_conn_rcu()
45 if (conn->proto.index_key < k.index_key) in rxrpc_find_service_conn_rcu()
47 else if (conn->proto.index_key > k.index_key) in rxrpc_find_service_conn_rcu()
51 conn = NULL; in rxrpc_find_service_conn_rcu()
56 _leave(" = %d", conn ? conn->debug_id : -1); in rxrpc_find_service_conn_rcu()
57 return conn; in rxrpc_find_service_conn_rcu()
65 struct rxrpc_connection *conn) in rxrpc_publish_service_conn() argument
68 struct rxrpc_conn_proto k = conn->proto; in rxrpc_publish_service_conn()
88 rb_link_node_rcu(&conn->service_node, parent, pp); in rxrpc_publish_service_conn()
[all …]
/openbmc/linux/net/bluetooth/
H A Dhci_conn.c48 struct hci_conn *conn; member
71 void hci_connect_le_scan_cleanup(struct hci_conn *conn, u8 status) in hci_connect_le_scan_cleanup() argument
74 struct hci_dev *hdev = conn->hdev; in hci_connect_le_scan_cleanup()
79 bdaddr = &conn->dst; in hci_connect_le_scan_cleanup()
80 bdaddr_type = conn->dst_type; in hci_connect_le_scan_cleanup()
94 if (params->conn) { in hci_connect_le_scan_cleanup()
95 hci_conn_drop(params->conn); in hci_connect_le_scan_cleanup()
96 hci_conn_put(params->conn); in hci_connect_le_scan_cleanup()
97 params->conn = NULL; in hci_connect_le_scan_cleanup()
110 mgmt_connect_failed(hdev, conn, status); in hci_connect_le_scan_cleanup()
[all …]
H A Dhci_sysfs.c15 struct hci_conn *conn = to_hci_conn(dev); in bt_link_release() local
16 kfree(conn); in bt_link_release()
24 void hci_conn_init_sysfs(struct hci_conn *conn) in hci_conn_init_sysfs() argument
26 struct hci_dev *hdev = conn->hdev; in hci_conn_init_sysfs()
28 bt_dev_dbg(hdev, "conn %p", conn); in hci_conn_init_sysfs()
30 conn->dev.type = &bt_link; in hci_conn_init_sysfs()
31 conn->dev.class = &bt_class; in hci_conn_init_sysfs()
32 conn->dev.parent = &hdev->dev; in hci_conn_init_sysfs()
34 device_initialize(&conn->dev); in hci_conn_init_sysfs()
37 void hci_conn_add_sysfs(struct hci_conn *conn) in hci_conn_add_sysfs() argument
[all …]
/openbmc/qemu/nbd/
H A Dclient-connection.c74 void nbd_client_connection_enable_retry(NBDClientConnection *conn) in nbd_client_connection_enable_retry() argument
76 conn->do_retry = true; in nbd_client_connection_enable_retry()
86 NBDClientConnection *conn = g_new(NBDClientConnection, 1); in nbd_client_connection_new() local
89 *conn = (NBDClientConnection) { in nbd_client_connection_new()
102 qemu_mutex_init(&conn->mutex); in nbd_client_connection_new()
104 return conn; in nbd_client_connection_new()
107 static void nbd_client_connection_do_free(NBDClientConnection *conn) in nbd_client_connection_do_free() argument
109 if (conn->sioc) { in nbd_client_connection_do_free()
110 qio_channel_close(QIO_CHANNEL(conn->sioc), NULL); in nbd_client_connection_do_free()
111 object_unref(OBJECT(conn->sioc)); in nbd_client_connection_do_free()
[all …]
/openbmc/linux/drivers/target/iscsi/
H A Discsi_target_login.c38 static struct iscsi_login *iscsi_login_init_conn(struct iscsit_conn *conn) in iscsi_login_init_conn() argument
47 conn->login = login; in iscsi_login_init_conn()
48 login->conn = conn; in iscsi_login_init_conn()
63 conn->conn_login = login; in iscsi_login_init_conn()
78 int iscsi_login_setup_crypto(struct iscsit_conn *conn) in iscsi_login_setup_crypto() argument
93 conn->conn_rx_hash = ahash_request_alloc(tfm, GFP_KERNEL); in iscsi_login_setup_crypto()
94 if (!conn->conn_rx_hash) { in iscsi_login_setup_crypto()
99 ahash_request_set_callback(conn->conn_rx_hash, 0, NULL, NULL); in iscsi_login_setup_crypto()
101 conn->conn_tx_hash = ahash_request_alloc(tfm, GFP_KERNEL); in iscsi_login_setup_crypto()
102 if (!conn->conn_tx_hash) { in iscsi_login_setup_crypto()
[all …]
H A Discsi_target_util.c61 iscsit_add_cmd_to_immediate_queue(cmd, cmd->conn, ISTATE_SEND_R2T); in iscsit_add_r2t_to_list()
155 struct iscsit_cmd *iscsit_allocate_cmd(struct iscsit_conn *conn, int state) in iscsit_allocate_cmd() argument
158 struct se_session *se_sess = conn->sess->se_sess; in iscsit_allocate_cmd()
167 size = sizeof(struct iscsit_cmd) + conn->conn_transport->priv_size; in iscsit_allocate_cmd()
173 cmd->conn = conn; in iscsit_allocate_cmd()
285 int iscsit_sequence_cmd(struct iscsit_conn *conn, struct iscsit_cmd *cmd, in iscsit_sequence_cmd() argument
292 mutex_lock(&conn->sess->cmdsn_mutex); in iscsit_sequence_cmd()
294 cmdsn_ret = iscsit_check_received_cmdsn(conn->sess, be32_to_cpu(cmdsn)); in iscsit_sequence_cmd()
298 if ((ret >= 0) && !list_empty(&conn->sess->sess_ooo_cmdsn_list)) in iscsit_sequence_cmd()
299 iscsit_execute_ooo_cmdsns(conn->sess); in iscsit_sequence_cmd()
[all …]
H A Discsi_target_nego.c101 static struct iscsi_node_auth *iscsi_get_node_auth(struct iscsit_conn *conn) in iscsi_get_node_auth() argument
107 if (conn->sess->sess_ops->SessionType) in iscsi_get_node_auth()
110 se_nacl = conn->sess->se_sess->se_node_acl; in iscsi_get_node_auth()
127 struct iscsit_conn *conn, in iscsi_handle_authentication() argument
136 auth = iscsi_get_node_auth(conn); in iscsi_handle_authentication()
141 strcpy(conn->sess->auth_type, "CHAP"); in iscsi_handle_authentication()
143 strcpy(conn->sess->auth_type, NONE); in iscsi_handle_authentication()
148 return chap_main_loop(conn, auth, in_buf, out_buf, in iscsi_handle_authentication()
154 static void iscsi_remove_failed_auth_entry(struct iscsit_conn *conn) in iscsi_remove_failed_auth_entry() argument
156 kfree(conn->auth_protocol); in iscsi_remove_failed_auth_entry()
[all …]
H A Discsi_target.c476 int iscsit_queue_rsp(struct iscsit_conn *conn, struct iscsit_cmd *cmd) in iscsit_queue_rsp() argument
478 return iscsit_add_cmd_to_response_queue(cmd, cmd->conn, cmd->i_state); in iscsit_queue_rsp()
482 void iscsit_aborted_task(struct iscsit_conn *conn, struct iscsit_cmd *cmd) in iscsit_aborted_task() argument
484 spin_lock_bh(&conn->cmd_lock); in iscsit_aborted_task()
487 spin_unlock_bh(&conn->cmd_lock); in iscsit_aborted_task()
498 iscsit_xmit_nondatain_pdu(struct iscsit_conn *conn, struct iscsit_cmd *cmd, in iscsit_xmit_nondatain_pdu() argument
510 if (conn->conn_ops->HeaderDigest) { in iscsit_xmit_nondatain_pdu()
513 iscsit_do_crypto_hash_buf(conn->conn_tx_hash, hdr, in iscsit_xmit_nondatain_pdu()
539 if (conn->conn_ops->DataDigest) { in iscsit_xmit_nondatain_pdu()
540 iscsit_do_crypto_hash_buf(conn->conn_tx_hash, in iscsit_xmit_nondatain_pdu()
[all …]
H A Discsi_target_erl0.c34 struct iscsit_conn *conn = cmd->conn; in iscsit_set_dataout_sequence_values() local
42 conn->sess->sess_ops->FirstBurstLength); in iscsit_set_dataout_sequence_values()
46 if (!conn->sess->sess_ops->DataSequenceInOrder) in iscsit_set_dataout_sequence_values()
52 conn->sess->sess_ops->MaxBurstLength) ? in iscsit_set_dataout_sequence_values()
54 conn->sess->sess_ops->MaxBurstLength) : cmd->se_cmd.data_length; in iscsit_set_dataout_sequence_values()
58 conn->sess->sess_ops->MaxBurstLength) >= in iscsit_set_dataout_sequence_values()
61 conn->sess->sess_ops->MaxBurstLength); in iscsit_set_dataout_sequence_values()
69 struct iscsit_conn *conn = cmd->conn; in iscsit_dataout_within_command_recovery_check() local
85 if (conn->sess->sess_ops->DataSequenceInOrder) { in iscsit_dataout_within_command_recovery_check()
103 if (conn->sess->sess_ops->DataPDUInOrder) { in iscsit_dataout_within_command_recovery_check()
[all …]
/openbmc/linux/drivers/gpu/drm/bridge/
H A Ddisplay-connector.c45 struct display_connector *conn = to_display_connector(bridge); in display_connector_detect() local
47 if (conn->hpd_gpio) { in display_connector_detect()
48 if (gpiod_get_value_cansleep(conn->hpd_gpio)) in display_connector_detect()
54 if (conn->bridge.ddc && drm_probe_ddc(conn->bridge.ddc)) in display_connector_detect()
57 switch (conn->bridge.type) { in display_connector_detect()
87 struct display_connector *conn = to_display_connector(bridge); in display_connector_get_edid() local
89 return drm_get_edid(connector, conn->bridge.ddc); in display_connector_get_edid()
109 struct drm_connector *conn = conn_state->connector; in display_connector_get_output_bus_fmts() local
117 if (conn->display_info.num_bus_formats && in display_connector_get_output_bus_fmts()
118 conn->display_info.bus_formats) in display_connector_get_output_bus_fmts()
[all …]
/openbmc/qemu/hw/hyperv/
H A Dhyperv_testdev.c117 TestMsgConn *conn = opaque; in msg_retry() local
118 assert(!hyperv_post_msg(conn->sint_route, &conn->msg)); in msg_retry()
123 TestMsgConn *conn = data; in msg_cb() local
131 aio_bh_schedule_oneshot(qemu_get_aio_context(), msg_retry, conn); in msg_cb()
138 TestMsgConn *conn = data; in msg_handler() local
141 conn->msg.header.message_type = msg->message_type; in msg_handler()
142 assert(msg->payload_size < sizeof(conn->msg.payload)); in msg_handler()
143 conn->msg.header.payload_size = msg->payload_size; in msg_handler()
144 memcpy(&conn->msg.payload, msg->payload, msg->payload_size); in msg_handler()
146 ret = hyperv_post_msg(conn->sint_route, &conn->msg); in msg_handler()
[all …]
/openbmc/bmcweb/include/
H A Dkvm_websocket.hpp23 conn(connIn), hostSocket(conn.getIoContext()) in KvmSession()
32 "conn:{}, Couldn't connect to KVM socket port: {}", in KvmSession()
33 logPtr(&conn), ec); in KvmSession()
49 BMCWEB_LOG_ERROR("conn:{}, Buffer overrun when writing {} bytes", in onMessage()
50 logPtr(&conn), data.length()); in onMessage()
51 conn.close("Buffer overrun"); in onMessage()
55 BMCWEB_LOG_DEBUG("conn:{}, Read {} bytes from websocket", logPtr(&conn), in onMessage()
59 BMCWEB_LOG_DEBUG("conn:{}, Committing {} bytes from websocket", in onMessage()
60 logPtr(&conn), copied); in onMessage()
63 BMCWEB_LOG_DEBUG("conn:{}, inputbuffer size {}", logPtr(&conn), in onMessage()
[all …]
/openbmc/linux/drivers/s390/net/
H A Dnetiucv.c168 struct iucv_connection *conn; member
179 struct iucv_connection *conn; member
246 static char *netiucv_printuser(struct iucv_connection *conn) in netiucv_printuser() argument
252 if (memcmp(conn->userdata, iucvMagic_ebcdic, 16)) { in netiucv_printuser()
255 memcpy(tmp_uid, netiucv_printname(conn->userid, 8), 8); in netiucv_printuser()
256 memcpy(tmp_udat, conn->userdata, 16); in netiucv_printuser()
262 return netiucv_printname(conn->userid, 8); in netiucv_printuser()
481 struct iucv_connection *conn = path->private; in netiucv_callback_rx() local
484 ev.conn = conn; in netiucv_callback_rx()
486 fsm_event(conn->fsm, CONN_EVENT_RX, &ev); in netiucv_callback_rx()
[all …]
/openbmc/linux/net/rds/
H A Dconnection.c89 struct rds_connection *conn, *ret = NULL; in rds_conn_lookup() local
91 hlist_for_each_entry_rcu(conn, head, c_hash_node) { in rds_conn_lookup()
92 if (ipv6_addr_equal(&conn->c_faddr, faddr) && in rds_conn_lookup()
93 ipv6_addr_equal(&conn->c_laddr, laddr) && in rds_conn_lookup()
94 conn->c_trans == trans && in rds_conn_lookup()
95 conn->c_tos == tos && in rds_conn_lookup()
96 net == rds_conn_net(conn) && in rds_conn_lookup()
97 conn->c_dev_if == dev_if) { in rds_conn_lookup()
98 ret = conn; in rds_conn_lookup()
102 rdsdebug("returning conn %p for %pI6c -> %pI6c\n", ret, in rds_conn_lookup()
[all …]
/openbmc/linux/fs/notify/
H A Dmark.c100 static __u32 *fsnotify_conn_mask_p(struct fsnotify_mark_connector *conn) in fsnotify_conn_mask_p() argument
102 if (conn->type == FSNOTIFY_OBJ_TYPE_INODE) in fsnotify_conn_mask_p()
103 return &fsnotify_conn_inode(conn)->i_fsnotify_mask; in fsnotify_conn_mask_p()
104 else if (conn->type == FSNOTIFY_OBJ_TYPE_VFSMOUNT) in fsnotify_conn_mask_p()
105 return &fsnotify_conn_mount(conn)->mnt_fsnotify_mask; in fsnotify_conn_mask_p()
106 else if (conn->type == FSNOTIFY_OBJ_TYPE_SB) in fsnotify_conn_mask_p()
107 return &fsnotify_conn_sb(conn)->s_fsnotify_mask; in fsnotify_conn_mask_p()
111 __u32 fsnotify_conn_mask(struct fsnotify_mark_connector *conn) in fsnotify_conn_mask() argument
113 if (WARN_ON(!fsnotify_valid_obj_type(conn->type))) in fsnotify_conn_mask()
116 return *fsnotify_conn_mask_p(conn); in fsnotify_conn_mask()
[all …]
/openbmc/linux/drivers/scsi/
H A Dlibiscsi.c88 inline void iscsi_conn_queue_xmit(struct iscsi_conn *conn) in iscsi_conn_queue_xmit() argument
90 struct Scsi_Host *shost = conn->session->host; in iscsi_conn_queue_xmit()
94 queue_work(ihost->workq, &conn->xmitwork); in iscsi_conn_queue_xmit()
98 inline void iscsi_conn_queue_recv(struct iscsi_conn *conn) in iscsi_conn_queue_recv() argument
100 struct Scsi_Host *shost = conn->session->host; in iscsi_conn_queue_recv()
103 if (ihost->workq && !test_bit(ISCSI_CONN_FLAG_SUSPEND_RX, &conn->flags)) in iscsi_conn_queue_recv()
104 queue_work(ihost->workq, &conn->recvwork); in iscsi_conn_queue_recv()
149 struct iscsi_conn *conn = task->conn; in iscsi_prep_data_out_pdu() local
163 if (left > conn->max_xmit_dlength) { in iscsi_prep_data_out_pdu()
164 hton24(hdr->dlength, conn->max_xmit_dlength); in iscsi_prep_data_out_pdu()
[all …]
/openbmc/openbmc-tools/netboot/
H A Dnetboot14 def expect_or_raise(conn, patterns, timeout=None): argument
15 i, m, d = conn.expect([bytes(p, "ascii") for p in patterns], timeout)
23 def encode_and_write(conn, comm="", sep="\n"): argument
26 conn.write(bytes(c, "ascii"))
31 conn = Telnet(host, port, timeout)
32 conn.encode_and_write = MethodType(encode_and_write, conn)
33 conn.expect_or_raise = MethodType(expect_or_raise, conn)
34 return conn
61 conn = init_telnet(console["host"], console["port"])
64 conn.encode_and_write()
[all …]

12345678910>>...27