+/******************************************************************
+ * locking.c
+ ******************************************************************/
+
+extern int lock_reg(int fd, int cmd, int type, off_t offest, int whence, off_t len);
+#define read_lock(fd, offset, whence, len) \
+ lock_reg((fd), F_SETLK, F_RDLCK, (offset), (whence), (len))
+#define write_lock(fd, offset, whence, len) \
+ lock_reg((fd), F_SETLK, F_WRLCK, (offset), (whence), (len))
+#define unlock(fd, offset, whence, len) \
+ lock_reg((fd), F_SETLK, F_UNLCK, (offset), (whence), (len))
+
+/******************************************************************
+ * socket.c
+ ******************************************************************/
+
+extern int setnonblock(int fd, int cmd);
+extern ssize_t readt(int socket, void *data, const size_t length, int setnonblocking, int timeout);
+extern const char *getip_string(const struct sockaddr *sa);
+extern unsigned int getip_port(const struct sockaddr *sa);
+extern void apply_ip_mask(struct sockaddr *ai, int maskbits);
+extern int compare_ip(const struct sockaddr *sa1, const struct sockaddr *sa2);
+
+/******************************************************************
+ * unix.c
+ *****************************************************************/
+
+extern const char *getcwdpath(void);
+extern char *stripped_slashes_basename(char *p);
+extern int lchdir(const char *dir);
+
+#endif /* _ATALK_UTIL_H */