Lines Matching refs:addr
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()
182 *p++ = hex[(addr->addr.u8[i+1] & 0xf0) >> 4]; in dsrv_print_addr()
183 *p++ = hex[(addr->addr.u8[i+1] & 0x0f)]; in dsrv_print_addr()
195 p += sprintf(p, ":%d", uip_htons(addr->port)); in dsrv_print_addr()
277 void dtls_dsrv_log_addr(log_t level, const char *name, const session_t *addr) in dtls_dsrv_log_addr() argument
282 len = dsrv_print_addr(addr, addrbuf, sizeof(addrbuf)); in dtls_dsrv_log_addr()