socket->address.local.sun_path[0] = 0;
}
}
+ else if (socket->form == f_socket_address_form_storage_e) {
+ address = (struct sockaddr *) &socket->address.storage;
+ socket->length = sizeof(struct sockaddr_storage);
+ }
#ifdef _en_support_socket_address_arp_
else if (socket->form == f_socket_address_form_arp_e) {
address = (struct sockaddr *) &socket->address.local;
socket->length = sizeof(struct sockaddr_un);
}
+ else if (socket->form == f_socket_address_form_storage_e) {
+ address = (struct sockaddr *) &socket->address.storage;
+ socket->length = sizeof(struct sockaddr_storage);
+ }
#ifdef _en_support_socket_address_arp_
else if (socket->form == f_socket_address_form_arp_e) {
f_socket_address_form_inet4_e,
f_socket_address_form_inet6_e,
f_socket_address_form_local_e,
- f_socket_address_form_storage,
+ f_socket_address_form_storage_e,
#ifdef _en_support_socket_address_arp_
f_socket_address_form_arp_e,
{
f_socket_t socket = f_socket_t_initialize;
- socket.domain = f_socket_protocol_family_inet4_e;
- socket.protocol = f_socket_protocol_tcp_e;
- socket.type = f_socket_address_family_inet4_e;
- socket.form = f_socket_address_form_inet4_e;
-
- for (uint8_t i = 0; i < 12; ++i) {
-
- will_return(__wrap_bind, true);
- will_return(__wrap_bind, errnos[i]);
-
- const f_status_t status = f_socket_bind(&socket);
-
- assert_int_equal(status, F_status_set_error(statuss[i]));
- } // for
- }
-
- {
- f_socket_t socket = f_socket_t_initialize;
- socket.domain = f_socket_protocol_family_inet6_e;
- socket.protocol = f_socket_protocol_tcp_e;
- socket.type = f_socket_address_family_inet6_e;
- socket.form = f_socket_address_form_inet6_e;
-
- for (uint8_t i = 0; i < 12; ++i) {
-
- will_return(__wrap_bind, true);
- will_return(__wrap_bind, errnos[i]);
-
- const f_status_t status = f_socket_bind(&socket);
-
- assert_int_equal(status, F_status_set_error(statuss[i]));
- } // for
- }
-
- {
- f_socket_t socket = f_socket_t_initialize;
socket.domain = f_socket_protocol_family_inet6_e;
socket.protocol = f_socket_protocol_tcp_e;
socket.type = f_socket_address_family_inet6_e;
} // for
}
+ // Storage is just that, so use ipv6 with storage as a test.
{
f_socket_t socket = f_socket_t_initialize;
- socket.domain = f_socket_protocol_family_local_e;
+ socket.domain = f_socket_protocol_family_inet6_e;
socket.protocol = f_socket_protocol_tcp_e;
- socket.type = f_socket_address_family_local_e;
- socket.form = f_socket_address_form_local_e;
+ socket.type = f_socket_address_family_inet6_e;
+ socket.form = f_socket_address_form_storage_e;
for (uint8_t i = 0; i < 12; ++i) {