Lines Matching refs:pcb

98       struct tcp_pcb *pcb = tcp_active_pcbs;
99 while (pcb != NULL) {
100 if ((pcb->state == ESTABLISHED) ||
101 (pcb->state == CLOSE_WAIT)) {
104 pcb = pcb->next;
165 tcp_ConnTable_get_cell_value_core(struct tcp_pcb *pcb, const u32_t *column, union snmp_variant_value *value, u32_t *value_len)
172 value->u32 = pcb->state + 1;
175 value->u32 = ip_2_ip4(&pcb->local_ip)->addr;
178 value->u32 = pcb->local_port;
181 if (pcb->state == LISTEN) {
184 value->u32 = ip_2_ip4(&pcb->remote_ip)->addr;
188 if (pcb->state == LISTEN) {
191 value->u32 = pcb->remote_port;
210 struct tcp_pcb *pcb;
225 pcb = *tcp_pcb_lists[i];
227 while (pcb != NULL) {
229 if (IP_IS_V4_VAL(pcb->local_ip) &&
230 ip4_addr_cmp(&local_ip, ip_2_ip4(&pcb->local_ip)) && (local_port == pcb->local_port)) {
233 if (pcb->state == LISTEN) {
236 return tcp_ConnTable_get_cell_value_core(pcb, column, value, value_len);
239 if (IP_IS_V4_VAL(pcb->remote_ip) &&
240 ip4_addr_cmp(&remote_ip, ip_2_ip4(&pcb->remote_ip)) && (remote_port == pcb->remote_port)) {
242 return tcp_ConnTable_get_cell_value_core(pcb, column, value, value_len);
247 pcb = pcb->next;
259 struct tcp_pcb *pcb;
268 pcb = *tcp_pcb_lists[i];
269 while (pcb != NULL) {
272 if (IP_IS_V4_VAL(pcb->local_ip)) {
273 snmp_ip4_to_oid(ip_2_ip4(&pcb->local_ip), &test_oid[0]);
274 test_oid[4] = pcb->local_port;
277 if (pcb->state == LISTEN) {
281 if (IP_IS_V6_VAL(pcb->remote_ip)) { /* should never happen */
284 snmp_ip4_to_oid(ip_2_ip4(&pcb->remote_ip), &test_oid[5]);
285 test_oid[9] = pcb->remote_port;
289 snmp_next_oid_check(&state, test_oid, LWIP_ARRAYSIZE(tcp_ConnTable_oid_ranges), pcb);
292 pcb = pcb->next;
312 tcp_ConnectionTable_get_cell_value_core(const u32_t *column, struct tcp_pcb *pcb, union snmp_variant_value *value)
317 value->u32 = pcb->state + 1;
334 struct tcp_pcb *pcb;
355 pcb = *tcp_pcb_nonlisten_lists[i];
357 while (pcb != NULL) {
358 if (ip_addr_cmp(&local_ip, &pcb->local_ip) &&
359 (local_port == pcb->local_port) &&
360 ip_addr_cmp(&remote_ip, &pcb->remote_ip) &&
361 (remote_port == pcb->remote_port)) {
363 return tcp_ConnectionTable_get_cell_value_core(column, pcb, value);
365 pcb = pcb->next;
376 struct tcp_pcb *pcb;
391 pcb = *tcp_pcb_nonlisten_lists[i];
393 while (pcb != NULL) {
398 idx += snmp_ip_port_to_oid(&pcb->local_ip, pcb->local_port, &test_oid[idx]);
401 idx += snmp_ip_port_to_oid(&pcb->remote_ip, pcb->remote_port, &test_oid[idx]);
404 snmp_next_oid_check(&state, test_oid, idx, pcb);
406 pcb = pcb->next;
443 struct tcp_pcb_listen *pcb;
455 pcb = tcp_listen_pcbs.listen_pcbs;
456 while (pcb != NULL) {
457 if (ip_addr_cmp(&local_ip, &pcb->local_ip) &&
458 (local_port == pcb->local_port)) {
462 pcb = pcb->next;
472 struct tcp_pcb_listen *pcb;
483 pcb = tcp_listen_pcbs.listen_pcbs;
484 while (pcb != NULL) {
489 idx += snmp_ip_port_to_oid(&pcb->local_ip, pcb->local_port, &test_oid[idx]);
494 pcb = pcb->next;