Lines Matching refs:sa
192 struct sockaddr_in *sa = (struct sockaddr_in *)((uint8_t *)ai + sizeof(struct addrinfo)); in _socket_getaddrinfo3() local
193 inet_addr_from_ip4addr(&sa->sin_addr, &addr); in _socket_getaddrinfo3()
194 sa->sin_family = AF_INET; in _socket_getaddrinfo3()
195 sa->sin_len = sizeof(struct sockaddr_in); in _socket_getaddrinfo3()
196 sa->sin_port = lwip_htons((u16_t)atoi(servname)); in _socket_getaddrinfo3()
198 ai->ai_canonname = ((char *)sa + sizeof(struct sockaddr_storage)); in _socket_getaddrinfo3()
201 ai->ai_addr = (struct sockaddr *)sa; in _socket_getaddrinfo3()
897 struct sockaddr_in *sa = (struct sockaddr_in *)bufinfo.buf; in mod_socket_sockaddr() local
900 t->items[1] = mp_obj_new_bytes((byte *)&sa->sin_addr, sizeof(sa->sin_addr)); in mod_socket_sockaddr()
901 t->items[2] = MP_OBJ_NEW_SMALL_INT(ntohs(sa->sin_port)); in mod_socket_sockaddr()
907 struct sockaddr_in6 *sa = (struct sockaddr_in6 *)bufinfo.buf; in mod_socket_sockaddr() local
910 t->items[1] = mp_obj_new_bytes((byte *)&sa->sin6_addr, sizeof(sa->sin6_addr)); in mod_socket_sockaddr()
911 t->items[2] = MP_OBJ_NEW_SMALL_INT(ntohs(sa->sin6_port)); in mod_socket_sockaddr()
912 t->items[3] = MP_OBJ_NEW_SMALL_INT(ntohl(sa->sin6_flowinfo)); in mod_socket_sockaddr()
913 t->items[4] = MP_OBJ_NEW_SMALL_INT(ntohl(sa->sin6_scope_id)); in mod_socket_sockaddr()
919 struct sockaddr *sa = (struct sockaddr *)bufinfo.buf; in mod_socket_sockaddr() local
921 t->items[0] = MP_OBJ_NEW_SMALL_INT(sa->sa_family); in mod_socket_sockaddr()
922 …t->items[1] = mp_obj_new_bytes((byte *)sa->sa_data, bufinfo.len - offsetof(struct sockaddr, sa_dat… in mod_socket_sockaddr()