Better fix of missing AF_INET6? definition in lib/socket.h
Moved the code to sysdep.
This commit is contained in:
parent
600998fcb1
commit
70b90dde23
2 changed files with 8 additions and 6 deletions
|
@ -10,7 +10,6 @@
|
||||||
#define _BIRD_SOCKET_H_
|
#define _BIRD_SOCKET_H_
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/socket.h>
|
|
||||||
|
|
||||||
#include "lib/resource.h"
|
#include "lib/resource.h"
|
||||||
|
|
||||||
|
@ -67,11 +66,8 @@ void sk_set_tbsize(sock *s, uint val); /* Resize TX buffer, keeping content */
|
||||||
void sk_set_tbuf(sock *s, void *tbuf); /* Switch TX buffer, NULL-> return to internal */
|
void sk_set_tbuf(sock *s, void *tbuf); /* Switch TX buffer, NULL-> return to internal */
|
||||||
void sk_dump_all(void);
|
void sk_dump_all(void);
|
||||||
|
|
||||||
static inline int sk_is_ipv4(sock *s)
|
int sk_is_ipv4(sock *s); /* True if socket is IPv4 */
|
||||||
{ return s->af == AF_INET; }
|
int sk_is_ipv6(sock *s); /* True if socket is IPv6 */
|
||||||
|
|
||||||
static inline int sk_is_ipv6(sock *s)
|
|
||||||
{ return s->af == AF_INET6; }
|
|
||||||
|
|
||||||
static inline int sk_send_buffer_empty(sock *sk)
|
static inline int sk_send_buffer_empty(sock *sk)
|
||||||
{ return sk->tbuf == sk->tpos; }
|
{ return sk->tbuf == sk->tpos; }
|
||||||
|
|
|
@ -1860,6 +1860,12 @@ sk_write(sock *s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sk_is_ipv4(sock *s)
|
||||||
|
{ return s->af == AF_INET; }
|
||||||
|
|
||||||
|
int sk_is_ipv6(sock *s)
|
||||||
|
{ return s->af == AF_INET6; }
|
||||||
|
|
||||||
void
|
void
|
||||||
sk_dump_all(void)
|
sk_dump_all(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue