Use uint16_t for port instead of a string
[cascardo/f2fchat.git] / friend.h
index 3c70741..b120fa1 100644 (file)
--- a/friend.h
+++ b/friend.h
@@ -19,7 +19,8 @@
 #ifndef _FRIEND_H
 #define _FRIEND_H
 
-#include <stdlib.h>
+#include <sys/types.h>
+#include <stdint.h>
 
 int sock_init(void);
 
@@ -27,7 +28,7 @@ struct friend;
 struct cache;
 int create_cache(struct cache **cache);
 int destroy_cache(struct cache *cache);
-int cache_add_friend(struct cache *cache, char *friend, char *address, char *port);
+int cache_add_friend(struct cache *cache, char *friend, char *address, uint16_t port);
 int load_cache(struct cache *cache, char *fname);
 int store_cache(struct cache *cache, char *fname);