Add support for multiple IP/port pairs in swift_sockaddr. Also add the user space...
[swifty.git] / src / kernel / swift.h
index 275b322..ab974c9 100644 (file)
@@ -3,10 +3,23 @@
 
 #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 {
        uint8_t src;