Move IPV4_LOCALHOST to net.h
This constant will be used from several files.
This commit is contained in:
parent
37c840a4c8
commit
0d45c29d13
2 changed files with 3 additions and 1 deletions
|
@ -161,7 +161,6 @@ disable_tunnel(struct server *server) {
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
listen_on_port(struct sc_intr *intr, sc_socket socket, uint16_t port) {
|
listen_on_port(struct sc_intr *intr, sc_socket socket, uint16_t port) {
|
||||||
#define IPV4_LOCALHOST 0x7F000001
|
|
||||||
return net_listen_intr(intr, socket, IPV4_LOCALHOST, port, 1);
|
return net_listen_intr(intr, socket, IPV4_LOCALHOST, port, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,11 @@
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
# define SC_INVALID_SOCKET -1
|
# define SC_INVALID_SOCKET -1
|
||||||
typedef int sc_socket;
|
typedef int sc_socket;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define IPV4_LOCALHOST 0x7F000001
|
||||||
|
|
||||||
bool
|
bool
|
||||||
net_init(void);
|
net_init(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue