summaryrefslogtreecommitdiff
path: root/lib/socket.h
diff options
context:
space:
mode:
authorPavel TvrdĂ­k <pawel.tvrdik@gmail.cz>2015-05-19 08:53:34 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2015-06-08 02:24:08 +0200
commitae80a2de95d3d3c153ce20b90c9d8757d02cb33d (patch)
treebe0c9427556557ff5b06b0250bc64ff33062199e /lib/socket.h
parente348ef01b433e06888310c1098a05291034a856c (diff)
unsigned [int] -> uint
Diffstat (limited to 'lib/socket.h')
-rw-r--r--lib/socket.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/socket.h b/lib/socket.h
index 683cdde3..fbea92aa 100644
--- a/lib/socket.h
+++ b/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 */