Add support for multiple IP/port pairs in swift_sockaddr. Also add the user space...
[swifty.git] / src / kernel / swift.h
old mode 100755 (executable)
new mode 100644 (file)
index 6c6f331..ab974c9
@@ -3,14 +3,27 @@
 
 #define IPPROTO_SWIFT 137
 
-#define sockaddr_swift sockaddr_in
 #define MIN_SWIFT_PORT 1
 #define MAX_SWIFT_PORT 256
 
+#ifndef __KERNEL__
+#include <inttypes.h>
+#endif
+
+struct swift_dest {
+    uint32_t addr;
+    uint8_t port;
+};
+
+struct sockaddr_swift {
+    int count;
+    struct swift_dest dests[0];
+};
+
 #ifdef __KERNEL__
 struct swifthdr {
-       __be16 src;
-       __be16 dst;
+       uint8_t src;
+       uint8_t dst;
        __be16 len;
 };
 #endif