raw: Add file declarations in source test files.
[swifty.git] / src / lib_swift.h
index c871789..666cc3b 100644 (file)
@@ -39,7 +39,11 @@ typedef struct swift {
        int maxChannels;
 } *Swift;
 
-// swift_addr structure similar with in_addr 
+/*
+ * TODO: uniform structure names
+ */
+
+// swift_addr structure similar with in_addr
 struct swift_addr {
        unsigned short N;                                       // e.g. number of s_addr
        unsigned long s_addr[MAX_IPs];          // i.p. ip list
@@ -48,15 +52,15 @@ struct swift_addr {
 // swift struct similar with sock_addr
 typedef struct sockSwiftaddr {
        short                           sin_family;             // e.g. AF_INET
-    unsigned short             sin_port;               // e.g. htons(3490)
-    struct swift_addr   sin_addr;              // see struct swift_addr, below
+       unsigned short          sin_port;               // e.g. htons(3490)
+       struct swift_addr   sin_addr;           // see struct swift_addr, below
 } *SockSwiftaddr;
 
 // list of swift_addr
 struct listsockaddr {
        unsigned short N;
        struct sockaddr_in sa[MAX_IPs];
-};     
+};
 
 // Function to create a Swift socket
 Swift socketSwift(int maxChannels);
@@ -74,10 +78,10 @@ int bindSwift(Swift s, const struct sockSwiftaddr *my_addr, socklen_t addrlen);
 // Function to receive a message
 ssize_t recvfromSwift(Swift s, void *buf, size_t len, int flags,
                  struct sockSwiftaddr *from, socklen_t fromlen);
-                 
+
 // Function to send a message
-ssize_t sendToSwift(Swift s, const void *buf, size_t len, int flags, 
-                                       const struct sockSwiftaddr *to, socklen_t tolen);
+ssize_t sendToSwift(Swift s, const void *buf, size_t len, int flags,
+               const struct sockSwiftaddr *to, socklen_t tolen);
 
 
 // test function -- don't commit