/third_party/lwip/src/core/ |
D | tcp.c | 130 #define TCP_KEEP_DUR(pcb) ((pcb)->keep_cnt * (pcb)->keep_intvl) argument 131 #define TCP_KEEP_INTVL(pcb) ((pcb)->keep_intvl) argument 133 #define TCP_KEEP_DUR(pcb) TCP_MAXIDLE argument 134 #define TCP_KEEP_INTVL(pcb) TCP_KEEPINTVL_DEFAULT argument 192 static err_t tcp_close_shutdown_fin(struct tcp_pcb *pcb); 210 tcp_free(struct tcp_pcb *pcb) in tcp_free() argument 212 LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN); in tcp_free() 214 tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); in tcp_free() 216 memp_free(MEMP_TCP_PCB, pcb); in tcp_free() 221 tcp_free_listen(struct tcp_pcb *pcb) in tcp_free_listen() argument [all …]
|
D | tcp_in.c | 91 static err_t tcp_process(struct tcp_pcb *pcb); 92 static void tcp_receive(struct tcp_pcb *pcb); 93 static void tcp_parseopt(struct tcp_pcb *pcb); 95 static void tcp_listen_input(struct tcp_pcb_listen *pcb); 96 static void tcp_timewait_input(struct tcp_pcb *pcb); 98 static int tcp_input_delayed_close(struct tcp_pcb *pcb); 101 static void tcp_add_sack(struct tcp_pcb *pcb, u32_t left, u32_t right); 102 static void tcp_remove_sacks_lt(struct tcp_pcb *pcb, u32_t seq); 104 static void tcp_remove_sacks_gt(struct tcp_pcb *pcb, u32_t seq); 120 struct tcp_pcb *pcb, *prev; local [all …]
|
D | raw.c | 69 raw_input_local_match(struct raw_pcb *pcb, u8_t broadcast) in raw_input_local_match() argument 74 if ((pcb->netif_idx != NETIF_NO_INDEX) && in raw_input_local_match() 75 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { in raw_input_local_match() 81 if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { in raw_input_local_match() 83 if ((broadcast != 0) && !ip_get_option(pcb, SOF_BROADCAST)) { in raw_input_local_match() 92 if (IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ip_current_dest_addr())) { in raw_input_local_match() 98 if (ip_get_option(pcb, SOF_BROADCAST)) in raw_input_local_match() 101 if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip))) { in raw_input_local_match() 108 if (ip_addr_isany(&pcb->local_ip) || in raw_input_local_match() 109 ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { in raw_input_local_match() [all …]
|
D | udp.c | 103 struct udp_pcb *pcb; in udp_new_port() local 110 for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { in udp_new_port() 111 if (pcb->local_port == udp_port) { in udp_new_port() 130 udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast) in udp_input_local_match() argument 135 LWIP_ASSERT("udp_input_local_match: invalid pcb", pcb != NULL); in udp_input_local_match() 139 if ((pcb->netif_idx != NETIF_NO_INDEX) && in udp_input_local_match() 140 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { in udp_input_local_match() 145 if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { in udp_input_local_match() 147 if ((broadcast != 0) && !ip_get_option(pcb, SOF_BROADCAST)) { in udp_input_local_match() 155 if (IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ip_current_dest_addr())) { in udp_input_local_match() [all …]
|
D | tcp_out.c | 89 #define LWIP_TCP_OPT_LENGTH_SEGMENT(flags, pcb) LWIP_HOOK_TCP_OUT_TCPOPT_LENGTH(pcb, LWIP_TCP_OPT_L… argument 91 #define LWIP_TCP_OPT_LENGTH_SEGMENT(flags, pcb) LWIP_TCP_OPT_LENGTH(flags) argument 128 static err_t tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif); 132 tcp_route(const struct tcp_pcb *pcb, const ip_addr_t *src, const ip_addr_t *dst) in tcp_route() argument 136 if ((pcb != NULL) && (pcb->netif_idx != NETIF_NO_INDEX)) { in tcp_route() 137 return netif_get_by_index(pcb->netif_idx); in tcp_route() 158 tcp_create_segment(const struct tcp_pcb *pcb, struct pbuf *p, u8_t hdrflags, u32_t seqno, u8_t optf… in tcp_create_segment() argument 163 LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL); in tcp_create_segment() 166 optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); in tcp_create_segment() 197 seg->tcphdr->src = lwip_htons(pcb->local_port); in tcp_create_segment() [all …]
|
D | altcp_tcp.c | 237 struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; in altcp_tcp_set_poll() local 239 tcp_poll(pcb, altcp_tcp_poll, interval); in altcp_tcp_set_poll() 247 struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; in altcp_tcp_recved() local 249 tcp_recved(pcb, len); in altcp_tcp_recved() 256 struct tcp_pcb *pcb; in altcp_tcp_bind() local 261 pcb = (struct tcp_pcb *)conn->state; in altcp_tcp_bind() 262 return tcp_bind(pcb, ipaddr, port); in altcp_tcp_bind() 268 struct tcp_pcb *pcb; in altcp_tcp_connect() local 274 pcb = (struct tcp_pcb *)conn->state; in altcp_tcp_connect() 275 return tcp_connect(pcb, ipaddr, port, altcp_tcp_connected); in altcp_tcp_connect() [all …]
|
/third_party/lwip/src/netif/ppp/ |
D | ppp.c | 218 void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd) { in ppp_set_auth() argument 221 pcb->settings.refuse_pap = !(authtype & PPPAUTHTYPE_PAP); in ppp_set_auth() 224 pcb->settings.refuse_chap = !(authtype & PPPAUTHTYPE_CHAP); in ppp_set_auth() 226 pcb->settings.refuse_mschap = !(authtype & PPPAUTHTYPE_MSCHAP); in ppp_set_auth() 227 pcb->settings.refuse_mschap_v2 = !(authtype & PPPAUTHTYPE_MSCHAP_V2); in ppp_set_auth() 231 pcb->settings.refuse_eap = !(authtype & PPPAUTHTYPE_EAP); in ppp_set_auth() 233 pcb->settings.user = user; in ppp_set_auth() 234 pcb->settings.passwd = passwd; in ppp_set_auth() 240 void ppp_set_mppe(ppp_pcb *pcb, u8_t flags) { in ppp_set_mppe() argument 242 pcb->settings.require_mppe = 0; in ppp_set_mppe() [all …]
|
D | chap-new.c | 67 { "chap-max-challenge", o_int, &pcb->settings.chap_max_transmits, 69 { "chap-interval", o_int, &pcb->settings.chap_rechallenge_time, 87 static void chap_init(ppp_pcb *pcb); 88 static void chap_lowerup(ppp_pcb *pcb); 89 static void chap_lowerdown(ppp_pcb *pcb); 92 static void chap_generate_challenge(ppp_pcb *pcb); 93 static void chap_handle_response(ppp_pcb *pcb, int code, 95 static int chap_verify_response(ppp_pcb *pcb, const char *name, const char *ourname, int id, 100 static void chap_respond(ppp_pcb *pcb, int id, 102 static void chap_handle_status(ppp_pcb *pcb, int code, int id, [all …]
|
D | upap.c | 83 static void upap_init(ppp_pcb *pcb); 84 static void upap_lowerup(ppp_pcb *pcb); 85 static void upap_lowerdown(ppp_pcb *pcb); 86 static void upap_input(ppp_pcb *pcb, u_char *inpacket, int l); 87 static void upap_protrej(ppp_pcb *pcb); 124 static void upap_rauthreq(ppp_pcb *pcb, u_char *inp, int id, int len); 126 static void upap_rauthack(ppp_pcb *pcb, u_char *inp, int id, int len); 127 static void upap_rauthnak(ppp_pcb *pcb, u_char *inp, int id, int len); 128 static void upap_sauthreq(ppp_pcb *pcb); 130 static void upap_sresp(ppp_pcb *pcb, u_char code, u_char id, const char *msg, int msglen); [all …]
|
D | eap.c | 98 static void eap_init(ppp_pcb *pcb); 99 static void eap_input(ppp_pcb *pcb, u_char *inp, int inlen); 100 static void eap_protrej(ppp_pcb *pcb); 101 static void eap_lowerup(ppp_pcb *pcb); 102 static void eap_lowerdown(ppp_pcb *pcb); 196 static void eap_init(ppp_pcb *pcb) { in eap_init() argument 198 BZERO(&pcb->eap, sizeof(eap_state)); in eap_init() 200 pcb->eap.es_server.ea_id = magic(); in eap_init() 209 ppp_pcb *pcb = (ppp_pcb*)arg; in eap_client_timeout() local 211 if (!eap_client_active(pcb)) in eap_client_timeout() [all …]
|
D | ccp.c | 168 static void ccp_init(ppp_pcb *pcb); 169 static void ccp_open(ppp_pcb *pcb); 170 static void ccp_close(ppp_pcb *pcb, const char *reason); 171 static void ccp_lowerup(ppp_pcb *pcb); 172 static void ccp_lowerdown(ppp_pcb *pcb); 173 static void ccp_input(ppp_pcb *pcb, u_char *pkt, int len); 174 static void ccp_protrej(ppp_pcb *pcb); 179 static void ccp_datainput(ppp_pcb *pcb, u_char *pkt, int len); 368 static void ccp_init(ppp_pcb *pcb) { in ccp_init() argument 369 fsm *f = &pcb->ccp_fsm; in ccp_init() [all …]
|
D | auth.c | 239 static void network_phase(ppp_pcb *pcb); 548 void link_required(ppp_pcb *pcb) { in link_required() argument 549 LWIP_UNUSED_ARG(pcb); in link_required() 559 ppp_pcb *pcb = &ppp_pcb_list[unit]; 563 new_phase(pcb, PPP_PHASE_SERIALCONN); 599 new_phase(pcb, PPP_PHASE_ESTABLISH); 601 lcp_lowerup(pcb); 605 new_phase(pcb, PPP_PHASE_DISCONNECT); 610 new_phase(pcb, PPP_PHASE_DEAD); 620 void link_terminated(ppp_pcb *pcb) { in link_terminated() argument [all …]
|
D | ipv6cp.c | 253 static void ipv6cp_init(ppp_pcb *pcb); 254 static void ipv6cp_open(ppp_pcb *pcb); 255 static void ipv6cp_close(ppp_pcb *pcb, const char *reason); 256 static void ipv6cp_lowerup(ppp_pcb *pcb); 257 static void ipv6cp_lowerdown(ppp_pcb *pcb); 258 static void ipv6cp_input(ppp_pcb *pcb, u_char *p, int len); 259 static void ipv6cp_protrej(ppp_pcb *pcb); 303 static void ipv6cp_clear_addrs(ppp_pcb *pcb, eui64_t ourid, eui64_t hisid); 428 static void ipv6cp_init(ppp_pcb *pcb) { 429 fsm *f = &pcb->ipv6cp_fsm; [all …]
|
D | lcp.c | 236 static void lcp_echo_lowerup(ppp_pcb *pcb); 237 static void lcp_echo_lowerdown(ppp_pcb *pcb); 267 static void lcp_init(ppp_pcb *pcb); 268 static void lcp_input(ppp_pcb *pcb, u_char *p, int len); 269 static void lcp_protrej(ppp_pcb *pcb); 363 static void lcp_init(ppp_pcb *pcb) { in lcp_init() argument 364 fsm *f = &pcb->lcp_fsm; in lcp_init() 365 lcp_options *wo = &pcb->lcp_wantoptions; in lcp_init() 366 lcp_options *ao = &pcb->lcp_allowoptions; in lcp_init() 368 f->pcb = pcb; in lcp_init() [all …]
|
/third_party/lwip/src/include/lwip/ |
D | tcp.h | 137 #define RCV_WND_SCALE(pcb, wnd) (((wnd) >> (pcb)->rcv_scale)) argument 138 #define SND_WND_SCALE(pcb, wnd) (((wnd) << (pcb)->snd_scale)) argument 140 #define TCP_WND_MAX(pcb) ((tcpwnd_size_t)(((pcb)->flags & TF_WND_SCALE) ? TCP_WND : TCPWND16… argument 142 #define RCV_WND_SCALE(pcb, wnd) (wnd) argument 143 #define SND_WND_SCALE(pcb, wnd) (wnd) argument 145 #define TCP_WND_MAX(pcb) TCP_WND argument 291 #define LWIP_TCP_SACK_VALID(pcb, idx) ((pcb)->rcv_sacks[idx].left != (pcb)->rcv_sacks[idx].right) argument 402 err_t lwip_tcp_event(void *arg, struct tcp_pcb *pcb, 414 void tcp_arg (struct tcp_pcb *pcb, void *arg); 416 void tcp_recv (struct tcp_pcb *pcb, tcp_recv_fn recv); [all …]
|
D | raw.h | 71 typedef u8_t (*raw_recv_fn)(void *arg, struct raw_pcb *pcb, struct pbuf *p, 106 void raw_remove (struct raw_pcb *pcb); 107 err_t raw_bind (struct raw_pcb *pcb, const ip_addr_t *ipaddr); 108 void raw_bind_netif (struct raw_pcb *pcb, const struct netif *netif); 109 err_t raw_connect (struct raw_pcb *pcb, const ip_addr_t *ipaddr); 110 void raw_disconnect (struct raw_pcb *pcb); 112 err_t raw_sendto (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr); 113 err_t raw_sendto_if_src(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, st… 114 err_t raw_send (struct raw_pcb *pcb, struct pbuf *p); 116 void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg); [all …]
|
D | udp.h | 77 typedef void (*udp_recv_fn)(void *arg, struct udp_pcb *pcb, struct pbuf *p, 121 void udp_remove (struct udp_pcb *pcb); 122 err_t udp_bind (struct udp_pcb *pcb, const ip_addr_t *ipaddr, 124 void udp_bind_netif (struct udp_pcb *pcb, const struct netif* netif); 125 err_t udp_connect (struct udp_pcb *pcb, const ip_addr_t *ipaddr, 127 void udp_disconnect (struct udp_pcb *pcb); 128 void udp_recv (struct udp_pcb *pcb, udp_recv_fn recv, 130 err_t udp_sendto_if (struct udp_pcb *pcb, struct pbuf *p, 133 err_t udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, 136 err_t udp_sendto (struct udp_pcb *pcb, struct pbuf *p, [all …]
|
/third_party/lwip/test/unit/tcp/ |
D | test_tcp.c | 84 struct tcp_pcb* pcb; in START_TEST() local 89 pcb = tcp_new(); in START_TEST() 90 fail_unless(pcb != NULL); in START_TEST() 91 if (pcb != NULL) { in START_TEST() 93 tcp_abort(pcb); in START_TEST() 102 struct tcp_pcb *pcb, *pcbl; in START_TEST() local 118 pcb = tcp_new(); in START_TEST() 119 EXPECT_RET(pcb != NULL); in START_TEST() 120 err = tcp_bind(pcb, &netif.ip_addr, 1234); in START_TEST() 122 pcbl = tcp_listen(pcb); in START_TEST() [all …]
|
D | test_tcp_oos.c | 28 static int tcp_oos_count(struct tcp_pcb* pcb) in tcp_oos_count() argument 31 struct tcp_seg* seg = pcb->ooseq; in tcp_oos_count() 41 static int tcp_oos_pbuf_count(struct tcp_pcb* pcb) in tcp_oos_pbuf_count() argument 44 struct tcp_seg* seg = pcb->ooseq; in tcp_oos_pbuf_count() 60 tcp_oos_seg_seqno(struct tcp_pcb* pcb, int seg_index) in tcp_oos_seg_seqno() argument 63 struct tcp_seg* seg = pcb->ooseq; in tcp_oos_seg_seqno() 84 tcp_oos_seg_tcplen(struct tcp_pcb* pcb, int seg_index) in tcp_oos_seg_tcplen() argument 87 struct tcp_seg* seg = pcb->ooseq; in tcp_oos_seg_tcplen() 107 tcp_oos_tcplen(struct tcp_pcb* pcb) in tcp_oos_tcplen() argument 110 struct tcp_seg* seg = pcb->ooseq; in tcp_oos_tcplen() [all …]
|
D | tcp_helper.c | 21 struct tcp_pcb *pcb = pcb_list; in tcp_remove() local 24 while(pcb != NULL) { in tcp_remove() 25 pcb2 = pcb; in tcp_remove() 26 pcb = pcb->next; in tcp_remove() 125 tcp_create_rx_segment(struct tcp_pcb* pcb, void* data, size_t data_len, u32_t seqno_offset, in tcp_create_rx_segment() argument 128 return tcp_create_segment(&pcb->remote_ip, &pcb->local_ip, pcb->remote_port, pcb->local_port, in tcp_create_rx_segment() 129 data, data_len, pcb->rcv_nxt + seqno_offset, pcb->lastack + ackno_offset, headerflags); in tcp_create_rx_segment() 137 struct pbuf* tcp_create_rx_segment_wnd(struct tcp_pcb* pcb, void* data, size_t data_len, in tcp_create_rx_segment_wnd() argument 140 return tcp_create_segment_wnd(&pcb->remote_ip, &pcb->local_ip, pcb->remote_port, pcb->local_port, in tcp_create_rx_segment_wnd() 141 data, data_len, pcb->rcv_nxt + seqno_offset, pcb->lastack + ackno_offset, headerflags, wnd); in tcp_create_rx_segment_wnd() [all …]
|
/third_party/lwip/src/include/lwip/priv/ |
D | tcp_priv.h | 80 void tcp_free (struct tcp_pcb *pcb); 81 void tcp_abandon (struct tcp_pcb *pcb, int reset); 82 err_t tcp_send_empty_ack(struct tcp_pcb *pcb); 83 err_t tcp_rexmit (struct tcp_pcb *pcb); 84 err_t tcp_rexmit_rto_prepare(struct tcp_pcb *pcb); 85 void tcp_rexmit_rto_commit(struct tcp_pcb *pcb); 86 void tcp_rexmit_rto (struct tcp_pcb *pcb); 87 void tcp_rexmit_fast (struct tcp_pcb *pcb); 88 u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb); 89 err_t tcp_process_refused_data(struct tcp_pcb *pcb); [all …]
|
/third_party/lwip/src/include/netif/ppp/ |
D | ppp_impl.h | 145 void (*connect) (ppp_pcb *pcb, void *ctx); 148 void (*listen) (ppp_pcb *pcb, void *ctx); 151 void (*disconnect) (ppp_pcb *pcb, void *ctx); 153 err_t (*free) (ppp_pcb *pcb, void *ctx); 155 err_t (*write)(ppp_pcb *pcb, void *ctx, struct pbuf *p); 157 err_t (*netif_output)(ppp_pcb *pcb, void *ctx, struct pbuf *p, u_short protocol); 159 void (*send_config)(ppp_pcb *pcb, void *ctx, u32_t accm, int pcomp, int accomp); 161 void (*recv_config)(ppp_pcb *pcb, void *ctx, u32_t accm, int pcomp, int accomp); 284 void (*init) (ppp_pcb *pcb); 286 void (*input) (ppp_pcb *pcb, u_char *pkt, int len); [all …]
|
/third_party/lwip/src/apps/snmp/ |
D | snmp_mib2_tcp.c | 98 struct tcp_pcb *pcb = tcp_active_pcbs; in tcp_get_value() local 99 while (pcb != NULL) { in tcp_get_value() 100 if ((pcb->state == ESTABLISHED) || in tcp_get_value() 101 (pcb->state == CLOSE_WAIT)) { in tcp_get_value() 104 pcb = pcb->next; in tcp_get_value() 165 tcp_ConnTable_get_cell_value_core(struct tcp_pcb *pcb, const u32_t *column, union snmp_variant_valu… in tcp_ConnTable_get_cell_value_core() argument 172 value->u32 = pcb->state + 1; in tcp_ConnTable_get_cell_value_core() 175 value->u32 = ip_2_ip4(&pcb->local_ip)->addr; in tcp_ConnTable_get_cell_value_core() 178 value->u32 = pcb->local_port; in tcp_ConnTable_get_cell_value_core() 181 if (pcb->state == LISTEN) { in tcp_ConnTable_get_cell_value_core() [all …]
|
D | snmp_mib2_udp.c | 122 struct udp_pcb *pcb; in udp_endpointTable_get_cell_value() local 148 pcb = udp_pcbs; in udp_endpointTable_get_cell_value() 149 while (pcb != NULL) { in udp_endpointTable_get_cell_value() 150 if (ip_addr_cmp(&local_ip, &pcb->local_ip) && in udp_endpointTable_get_cell_value() 151 (local_port == pcb->local_port) && in udp_endpointTable_get_cell_value() 152 ip_addr_cmp(&remote_ip, &pcb->remote_ip) && in udp_endpointTable_get_cell_value() 153 (remote_port == pcb->remote_port)) { in udp_endpointTable_get_cell_value() 157 pcb = pcb->next; in udp_endpointTable_get_cell_value() 167 struct udp_pcb *pcb; in udp_endpointTable_get_next_cell_instance_and_value() local 181 pcb = udp_pcbs; in udp_endpointTable_get_next_cell_instance_and_value() [all …]
|
/third_party/lwip/src/api/ |
D | api_msg.c | 159 recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p, in recv_raw() argument 190 buf->port = pcb->protocol; in recv_raw() 218 recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p, argument 228 LWIP_UNUSED_ARG(pcb); /* only used for asserts... */ 229 LWIP_ASSERT("recv_udp must have a pcb argument", pcb != NULL); 238 LWIP_ASSERT("recv_udp: recv for wrong pcb!", conn->pcb.udp == pcb); 293 recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) argument 299 LWIP_UNUSED_ARG(pcb); 300 LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL); 309 LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb); [all …]
|