aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-02-13 20:00:53 -0600
committerRob Landley <rob@landley.net>2019-02-13 20:00:53 -0600
commit7e6a7da60042dbf033cc3136877a2862bf825bd1 (patch)
tree24f98032c51c97237c51d3af6e36580758a15a50 /lib/lib.h
parentfbedc9dd74aeb0331202f9e503316960e32fa879 (diff)
downloadtoybox-7e6a7da60042dbf033cc3136877a2862bf825bd1.tar.gz
Move nanomove(), nanodiff(), union socksaddr, and xrecvwait() to lib.
Diffstat (limited to 'lib/lib.h')
-rw-r--r--lib/lib.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/lib.h b/lib/lib.h
index ed31ffa9..b36d7a75 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -205,6 +205,8 @@ struct string_list **splitpath(char *path, struct string_list **list);
char *readfileat(int dirfd, char *name, char *buf, off_t *len);
char *readfile(char *name, char *buf, off_t len);
void msleep(long miliseconds);
+void nanomove(struct timespec *ts, long long offset);
+long long nanodiff(struct timespec *old, struct timespec *new);
int highest_bit(unsigned long l);
int64_t peek_le(void *ptr, unsigned size);
int64_t peek_be(void *ptr, unsigned size);
@@ -301,6 +303,13 @@ void tty_sigreset(int i);
void start_redraw(unsigned *width, unsigned *height);
// net.c
+
+union socksaddr {
+ struct sockaddr s;
+ struct sockaddr_in in;
+ struct sockaddr_in6 in6;
+};
+
int xsocket(int domain, int type, int protocol);
void xsetsockopt(int fd, int level, int opt, void *val, socklen_t len);
struct addrinfo *xgetaddrinfo(char *host, char *port, int family, int socktype,
@@ -311,6 +320,7 @@ int xpoll(struct pollfd *fds, int nfds, int timeout);
int pollinate(int in1, int in2, int out1, int out2, int timeout, int shutdown_timeout);
char *ntop(struct sockaddr *sa);
void xsendto(int sockfd, void *buf, size_t len, struct sockaddr *dest);
+int xrecvwait(int fd, char *buf, int len, union socksaddr *sa, int timeout);
// password.c
int get_salt(char *salt, char * algo);