mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
unsigned [int] -> uint
This commit is contained in:
committed by
Ondrej Zajicek
parent
e348ef01b4
commit
ae80a2de95
14
lib/socket.h
14
lib/socket.h
@@ -20,7 +20,7 @@ typedef struct birdsock {
|
||||
int type; /* Socket type */
|
||||
void *data; /* User data */
|
||||
ip_addr saddr, daddr; /* IPA_NONE = unspecified */
|
||||
unsigned sport, dport; /* 0 = unspecified (for IP: protocol type) */
|
||||
uint sport, dport; /* 0 = unspecified (for IP: protocol type) */
|
||||
int tos; /* TOS / traffic class, -1 = default */
|
||||
int priority; /* Local socket priority, -1 = default */
|
||||
int ttl; /* Time To Live, -1 = default */
|
||||
@@ -28,20 +28,20 @@ typedef struct birdsock {
|
||||
struct iface *iface; /* Interface; specify this for broad/multicast sockets */
|
||||
|
||||
byte *rbuf, *rpos; /* NULL=allocate automatically */
|
||||
unsigned rbsize;
|
||||
uint rbsize;
|
||||
int (*rx_hook)(struct birdsock *, int size); /* NULL=receiving turned off, returns 1 to clear rx buffer */
|
||||
|
||||
byte *tbuf, *tpos; /* NULL=allocate automatically */
|
||||
byte *ttx; /* Internal */
|
||||
unsigned tbsize;
|
||||
uint tbsize;
|
||||
void (*tx_hook)(struct birdsock *);
|
||||
|
||||
void (*err_hook)(struct birdsock *, int); /* errno or zero if EOF */
|
||||
|
||||
/* Information about received datagrams (UDP, RAW), valid in rx_hook */
|
||||
ip_addr faddr, laddr; /* src (From) and dst (Local) address of the datagram */
|
||||
unsigned fport; /* src port of the datagram */
|
||||
unsigned lifindex; /* local interface that received the datagram */
|
||||
uint fport; /* src port of the datagram */
|
||||
uint lifindex; /* local interface that received the datagram */
|
||||
/* laddr and lifindex are valid only if SKF_LADDR_RX flag is set to request it */
|
||||
|
||||
int af; /* Address family (AF_INET, AF_INET6 or 0 for non-IP) of fd */
|
||||
@@ -59,8 +59,8 @@ sock *sock_new(pool *); /* Allocate new socket */
|
||||
|
||||
int sk_open(sock *); /* Open socket */
|
||||
int sk_rx_ready(sock *s);
|
||||
int sk_send(sock *, unsigned len); /* Send data, <0=err, >0=ok, 0=sleep */
|
||||
int sk_send_to(sock *, unsigned len, ip_addr to, unsigned port); /* sk_send to given destination */
|
||||
int sk_send(sock *, uint len); /* Send data, <0=err, >0=ok, 0=sleep */
|
||||
int sk_send_to(sock *, uint len, ip_addr to, uint port); /* sk_send to given destination */
|
||||
void sk_reallocate(sock *); /* Free and allocate tbuf & rbuf */
|
||||
void sk_set_rbsize(sock *s, uint val); /* Resize RX buffer */
|
||||
void sk_set_tbsize(sock *s, uint val); /* Resize TX buffer, keeping content */
|
||||
|
Reference in New Issue
Block a user