12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #ifndef _sHT_SOCKET_H
- #define _sHT_SOCKET_H
- #include <fcntl.h>
- #include <netinet/in.h>
- #include <stdint.h>
- #include <sys/socket.h>
- enum sHT_sock_type
- {
- sHT_SOCK_STREAM = SOCK_STREAM | O_NONBLOCK,
- sHT_SOCK_STREAM_CLOEXEC = SOCK_STREAM | O_NONBLOCK | O_CLOEXEC,
- sHT_SOCK_DGRAM = SOCK_DGRAM | O_NONBLOCK,
- sHT_SOCK_DGRAM_CLOEXEC = SOCK_DGRAM | O_NONBLOCK | O_CLOEXEC,
- };
- struct sHT_passive_in6
- {
- struct sockaddr_in6 addr;
- enum sHT_sock_type type;
- int backlog;
-
-
- };
- void
- sHT_close(int fd);
- __attribute__((warn_unused_result))
- __attribute__((nonnull (1)))
- int
- sHT_passive_ipv6(const struct sHT_passive_in6 *in);
- #endif
|