summaryrefslogtreecommitdiffstats
path: root/kernel/misc.h
blob: 8f7f511ee0c6456e39337ede4385870b3cb34b40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * kernel/misc.h - Usefull stuff that doesn't fit anywhere else.
 */


#define SEND 1
#define RECV 0


/*
 * Jiffies between now and @then.
 */
uint16_t diff(uint16_t then);

/*
 * Send or receive packet (from nbd.c)
 */
int sock_xmit(struct socket *sock, int send, void *buf, int size);

/*
 * Pretty printing of IPs.
 */
char *inet_ntoa(uint32_t ip);