/net-tools-2.7.6/libcoap/include/coap/ |
D | address.h | 27 ip_addr_t addr; member 30 #define _coap_address_equals_impl(A, B) (!!ip_addr_cmp(&(A)->addr,&(B)->addr)) 32 #define _coap_address_isany_impl(A) ip_addr_isany(&(A)->addr) 34 #define _coap_is_mcast_impl(Address) ip_addr_ismulticast(&(Address)->addr) 41 uip_ipaddr_t addr; member 47 && uip_ipaddr_cmp(&((A)->addr),&((B)->addr))) 52 #define _coap_is_mcast_impl(Address) uip_is_addr_mcast(&((Address)->addr)) 64 } addr; member 77 switch (a->addr.sa.sa_family) { in _coap_address_isany_impl() 79 return a->addr.sin.sin_addr.s_addr == INADDR_ANY; in _coap_address_isany_impl() [all …]
|
D | coap_io.h | 54 coap_address_t addr; /**< local interface address */ member 62 coap_endpoint_t *coap_new_endpoint(const coap_address_t *addr, int flags);
|
/net-tools-2.7.6/libcoap/examples/contiki/ |
D | coap-observer.c | 64 uip_ip6addr(&listen_addr.addr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0); in init_coap() 65 uip_ds6_set_addr_iid(&listen_addr.addr, &uip_lladdr); in init_coap() 66 uip_ds6_addr_add(&listen_addr.addr, 0, ADDR_AUTOCONF); in init_coap() 70 uip_debug_ipaddr_print(&listen_addr.addr); in init_coap() 76 listen_addr.addr.u8[0], listen_addr.addr.u8[1], in init_coap() 77 listen_addr.addr.u8[2], listen_addr.addr.u8[3], in init_coap() 78 listen_addr.addr.u8[4], listen_addr.addr.u8[5], in init_coap() 79 listen_addr.addr.u8[6], listen_addr.addr.u8[7], in init_coap() 80 listen_addr.addr.u8[8], listen_addr.addr.u8[9], in init_coap() 81 listen_addr.addr.u8[10], listen_addr.addr.u8[11], in init_coap() [all …]
|
D | server.c | 63 uip_ip6addr(&listen_addr.addr, 0xaaaa, 0, 0, 0, 0, 0, 0, NODE_ADDR); in init_coap_server() 65 uip_ds6_prefix_add(&listen_addr.addr, 64, 0, 0, 0, 0); in init_coap_server() 68 uip_ds6_addr_add(&listen_addr.addr, 0, ADDR_MANUAL); in init_coap_server() 76 uip_debug_ipaddr_print(&listen_addr.addr); in init_coap_server()
|
/net-tools-2.7.6/tinydtls-0.8.2/ |
D | session.c | 42 && uip_ipaddr_cmp(&((A)->addr),&((B)->addr)) \ 51 a->size != b->size || a->addr.sa.sa_family != b->addr.sa.sa_family) in _dtls_address_equals_impl() 55 switch (a->addr.sa.sa_family) { in _dtls_address_equals_impl() 58 a->addr.sin.sin_port == b->addr.sin.sin_port && in _dtls_address_equals_impl() 59 memcmp(&a->addr.sin.sin_addr, &b->addr.sin.sin_addr, in _dtls_address_equals_impl() 62 return a->addr.sin6.sin6_port == b->addr.sin6.sin6_port && in _dtls_address_equals_impl() 63 memcmp(&a->addr.sin6.sin6_addr, &b->addr.sin6.sin6_addr, in _dtls_address_equals_impl() 76 sess->size = sizeof(sess->addr); in dtls_session_init()
|
D | debug.c | 118 dsrv_print_addr(const session_t *addr, char *buf, size_t len) { in dsrv_print_addr() argument 124 switch (addr->addr.sa.sa_family) { in dsrv_print_addr() 129 addrptr = &addr->addr.sin.sin_addr; in dsrv_print_addr() 130 port = ntohs(addr->addr.sin.sin_port); in dsrv_print_addr() 138 addrptr = &addr->addr.sin6.sin6_addr; in dsrv_print_addr() 139 port = ntohs(addr->addr.sin6.sin6_port); in dsrv_print_addr() 147 if (inet_ntop(addr->addr.sa.sa_family, addrptr, p, len) == 0) { in dsrv_print_addr() 154 if (addr->addr.sa.sa_family == AF_INET6) { in dsrv_print_addr() 180 *p++ = hex[(addr->addr.u8[i] & 0xf0) >> 4]; in dsrv_print_addr() 181 *p++ = hex[(addr->addr.u8[i] & 0x0f)]; in dsrv_print_addr() [all …]
|
D | session.h | 38 uip_ipaddr_t addr; member 56 } addr; member
|
/net-tools-2.7.6/libcoap/src/ |
D | address.c | 20 if (a->size != b->size || a->addr.sa.sa_family != b->addr.sa.sa_family) in coap_address_equals() 24 switch (a->addr.sa.sa_family) { in coap_address_equals() 27 a->addr.sin.sin_port == b->addr.sin.sin_port && in coap_address_equals() 28 memcmp(&a->addr.sin.sin_addr, &b->addr.sin.sin_addr, in coap_address_equals() 31 return a->addr.sin6.sin6_port == b->addr.sin6.sin6_port && in coap_address_equals() 32 memcmp(&a->addr.sin6.sin6_addr, &b->addr.sin6.sin6_addr, in coap_address_equals()
|
D | coap_io.c | 78 coap_new_endpoint(const coap_address_t *addr, int flags) { in coap_new_endpoint() argument 90 coap_address_init(&ep->addr); in coap_new_endpoint() 91 uip_ipaddr_copy(&ep->addr.addr, &addr->addr); in coap_new_endpoint() 92 ep->addr.port = addr->port; in coap_new_endpoint() 93 udp_bind((struct uip_udp_conn *)ep->handle.conn, addr->port); in coap_new_endpoint() 120 coap_new_endpoint(const coap_address_t *addr, int flags) { in coap_new_endpoint() argument 121 int sockfd = socket(addr->addr.sa.sa_family, SOCK_DGRAM, 0); in coap_new_endpoint() 134 switch(addr->addr.sa.sa_family) { in coap_new_endpoint() 153 if (bind(sockfd, &addr->addr.sa, addr->size) < 0) { in coap_new_endpoint() 171 ep->addr.size = addr->size; in coap_new_endpoint() [all …]
|
D | debug.c | 162 coap_print_addr(const struct coap_address_t *addr, unsigned char *buf, size_t len) { in coap_print_addr() argument 168 switch (addr->addr.sa.sa_family) { in coap_print_addr() 170 addrptr = &addr->addr.sin.sin_addr; in coap_print_addr() 171 port = ntohs(addr->addr.sin.sin_port); in coap_print_addr() 179 addrptr = &addr->addr.sin6.sin6_addr; in coap_print_addr() 180 port = ntohs(addr->addr.sin6.sin6_port); in coap_print_addr() 188 if (inet_ntop(addr->addr.sa.sa_family, addrptr, (char *)p, len) == 0) { in coap_print_addr() 195 if (addr->addr.sa.sa_family == AF_INET6) { in coap_print_addr() 221 *p++ = hex[(addr->addr.u8[i] & 0xf0) >> 4]; in coap_print_addr() 222 *p++ = hex[(addr->addr.u8[i] & 0x0f)]; in coap_print_addr() [all …]
|
D | coap_io_lwip.c | 21 memcpy(&target->addr, ip_current_src_addr(), sizeof(ip_addr_t)); in coap_packet_copy_source() 52 static void coap_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, ip_addr_t *addr, u16_t port) in coap_recv() argument 67 coap_endpoint_t *coap_new_endpoint(const coap_address_t *addr, int flags) { in coap_new_endpoint() argument 80 err = udp_bind(result->pcb, &addr->addr, addr->port); in coap_new_endpoint()
|
/net-tools-2.7.6/mbedtls-2.4.0/programs/ssl/ |
D | mini_client.c | 175 struct sockaddr_in addr; in main() local 248 memset( &addr, 0, sizeof( addr ) ); in main() 249 addr.sin_family = AF_INET; in main() 252 addr.sin_port = *((char *) &ret) == ret ? PORT_LE : PORT_BE; in main() 253 addr.sin_addr.s_addr = *((char *) &ret) == ret ? ADDR_LE : ADDR_BE; in main() 263 (const struct sockaddr *) &addr, sizeof( addr ) ) < 0 ) in main()
|
/net-tools-2.7.6/libcoap/examples/ |
D | coap-rd.c | 306 switch(peer->addr.sa.sa_family) { in add_source_address() 316 peer->addr.sin6.sin6_addr.s6_addr[0], in add_source_address() 317 peer->addr.sin6.sin6_addr.s6_addr[1], in add_source_address() 318 peer->addr.sin6.sin6_addr.s6_addr[2], in add_source_address() 319 peer->addr.sin6.sin6_addr.s6_addr[3], in add_source_address() 320 peer->addr.sin6.sin6_addr.s6_addr[4], in add_source_address() 321 peer->addr.sin6.sin6_addr.s6_addr[5], in add_source_address() 322 peer->addr.sin6.sin6_addr.s6_addr[6], in add_source_address() 323 peer->addr.sin6.sin6_addr.s6_addr[7], in add_source_address() 324 peer->addr.sin6.sin6_addr.s6_addr[8], in add_source_address() [all …]
|
D | client.c | 1001 coap_address_t addr; in get_context() local 1003 if (rp->ai_addrlen <= sizeof(addr.addr)) { in get_context() 1004 coap_address_init(&addr); in get_context() 1005 addr.size = rp->ai_addrlen; in get_context() 1006 memcpy(&addr.addr, rp->ai_addr, rp->ai_addrlen); in get_context() 1008 ctx = coap_new_context(&addr); in get_context() 1027 static char addr[INET6_ADDRSTRLEN]; in main() local 1133 res = resolve_address(&server, &dst.addr.sa); in main() 1141 dst.addr.sin.sin_port = htons(port); in main() 1145 switch (dst.addr.sa.sa_family) { in main() [all …]
|
D | coap-server.c | 363 coap_address_t addr; in get_context() local 365 if (rp->ai_addrlen <= sizeof(addr.addr)) { in get_context() 366 coap_address_init(&addr); in get_context() 367 addr.size = rp->ai_addrlen; in get_context() 368 memcpy(&addr.addr, rp->ai_addr, rp->ai_addrlen); in get_context() 370 ctx = coap_new_context(&addr); in get_context()
|
/net-tools-2.7.6/libcoap/tests/ |
D | test_wellknown.c | 249 coap_address_t addr; in t_wkc_tests_create() local 251 coap_address_init(&addr); in t_wkc_tests_create() 253 addr.size = sizeof(struct sockaddr_in6); in t_wkc_tests_create() 254 addr.addr.sin6.sin6_family = AF_INET6; in t_wkc_tests_create() 255 addr.addr.sin6.sin6_addr = in6addr_any; in t_wkc_tests_create() 256 addr.addr.sin6.sin6_port = htons(COAP_DEFAULT_PORT); in t_wkc_tests_create() 258 ctx = coap_new_context(&addr); in t_wkc_tests_create()
|
/net-tools-2.7.6/tinydtls-0.8.2/examples/contiki/ |
D | dtls-client.c | 114 uip_ipaddr_copy(&conn->ripaddr, &session->addr); in send_to_peer() 215 uip_ipaddr_copy(&session.addr, &UIP_IP_BUF->srcipaddr); in dtls_handle_read() 217 session.size = sizeof(session.addr) + sizeof(session.port); in dtls_handle_read() 221 PRINT6ADDR(&session.addr); in dtls_handle_read() 279 dst->size = sizeof(dst->addr) + sizeof(dst->port); in init_dtls() 282 set_connection_address(&dst->addr); in init_dtls() 283 client_conn = udp_new(&dst->addr, 0, NULL); in init_dtls() 287 PRINT6ADDR(&dst->addr); in init_dtls()
|
D | dtls-server.c | 99 uip_ipaddr_copy(&conn->ripaddr, &session->addr); in send_to_peer() 196 uip_ipaddr_copy(&session.addr, &UIP_IP_BUF->srcipaddr); in dtls_handle_read() 198 session.size = sizeof(session.addr) + sizeof(session.port); in dtls_handle_read() 268 memcpy(&uip_lladdr.addr, &tmp_addr.u8, 8); in init_dtls()
|
/net-tools-2.7.6/ |
D | zeth-vlan.conf | 46 ip -6 addr add ${PREFIX_1_IPV6}::2 dev ${VLAN_NAME_PREFIX}.${VLAN_1_ID} 50 ip -6 addr add ${PREFIX_2_IPV6}::2 dev ${VLAN_NAME_PREFIX}.${VLAN_2_ID} 54 ip addr add ${PREFIX_1_IPV4}.2/${PREFIXLEN_1_IPV4} \ 59 ip addr add ${PREFIX_2_IPV4}.2/${PREFIXLEN_2_IPV4} \
|
D | zeth-tunnel.conf | 61 ip addr add ${PREFIX_1_IPV4}.2/${PREFIXLEN_1_IPV4} dev ${TUNNEL_V4V4} 62 ip addr add ${PREFIX_2_IPV4}.2/${PREFIXLEN_2_IPV4} dev ${TUNNEL_V4V6} 66 ip -6 addr add ${PREFIX_1_IPV6}::2/${PREFIXLEN_1_IPV6} dev ${TUNNEL_V6V6} 67 ip -6 addr add ${PREFIX_2_IPV6}::2/${PREFIXLEN_2_IPV6} dev ${TUNNEL_V6V4}
|
D | tcptest.py | 35 addr = sys.argv[2] variable 39 addr, iface, scope_id 43 sock.connect((addr, 4242, 0, scope_id))
|
D | echo-server.c | 92 static int bind_device(int fd, const char *interface, void *addr, int len, in bind_device() argument 115 addr4 = ((struct sockaddr_in *)addr); in bind_device() 121 addr6 = ((struct sockaddr_in6 *)addr); in bind_device() 128 ret = bind(fd, (struct sockaddr *)addr, len); in bind_device() 135 struct sockaddr *addr, socklen_t *addrlen, int proto) in receive() argument 140 ret = recvfrom(fd, buf, buflen, 0, addr, addrlen); in receive() 160 struct sockaddr *addr, socklen_t addrlen, int proto) in reply() argument 165 ret = sendto(fd, buf, buflen, 0, addr, addrlen); in reply() 262 static int join_mc_group(int sock, int ifindex, int family, void *addr, in join_mc_group() argument 271 memcpy(&req.gr_group, addr, addr_len); in join_mc_group()
|
D | tunslip6.c | 242 struct in6_addr addr; in serial_to_tun() local 248 inet_pton(AF_INET6, ipaddr, &addr); in serial_to_tun() 253 addr.s6_addr[0], addr.s6_addr[1], in serial_to_tun() 254 addr.s6_addr[2], addr.s6_addr[3], in serial_to_tun() 255 addr.s6_addr[4], addr.s6_addr[5], in serial_to_tun() 256 addr.s6_addr[6], addr.s6_addr[7]); in serial_to_tun() 261 slip_send_char(slipfd, addr.s6_addr[i]); in serial_to_tun()
|
D | coap-client.c | 919 unsigned char addr[INET6_ADDRSTRLEN+8]; in dispatch_data() local 921 if (coap_print_addr(src, addr, INET6_ADDRSTRLEN+8)) in dispatch_data() 923 (int)bytes_read, addr); in dispatch_data() 942 coap_address_t addr; in read_from_peer() local 947 memcpy(&(addr.addr), &(session->addr), session->size); in read_from_peer() 948 addr.size = session->size; in read_from_peer() 952 &addr) < 0) { in read_from_peer() 1004 &session->addr.sa, session->size); in send_to_peer() 1017 session.size = sizeof(session.addr); in dtls_handle_read() 1019 0, &session.addr.sa, &session.size); in dtls_handle_read() [all …]
|
/net-tools-2.7.6/tinydtls-0.8.2/tests/ |
D | dtls-client.c | 200 &session->addr.sa, session->size); in send_to_peer() 217 session.size = sizeof(session.addr); in dtls_handle_read() 219 &session.addr.sa, &session.size); in dtls_handle_read() 418 res = resolve_address(argv[optind++], &dst.addr.sa); 427 dst.addr.sin.sin_port = htons(atoi(optind < argc ? argv[optind++] : port_str)); 431 fd = socket(dst.addr.sa.sa_family, SOCK_DGRAM, 0);
|