-------------------------------------------------------------------------*\ * Tries to create a new inet socket \*-------------------------------------------------------------------------*/
| 351 | * Tries to create a new inet socket |
| 352 | \*-------------------------------------------------------------------------*/ |
| 353 | const char *inet_trycreate(p_socket ps, int family, int type, int protocol) { |
| 354 | const char *err = socket_strerror(socket_create(ps, family, type, protocol)); |
| 355 | if (err == NULL && family == AF_INET6) { |
| 356 | int yes = 1; |
| 357 | setsockopt(*ps, IPPROTO_IPV6, IPV6_V6ONLY, (const char *)&yes, sizeof(yes)); |
| 358 | } |
| 359 | return err; |
| 360 | } |
| 361 | |
| 362 | /*-------------------------------------------------------------------------*\ |
| 363 | * "Disconnects" a DGRAM socket |
no test coverage detected