]> p2p-next.cs.pub.ro Git - swifty.git/commitdiff
Rename swift.* files to mptp.*
authorAdrian Bondrescu <adi.bondrescu@gmail.com>
Sun, 24 Jun 2012 08:32:48 +0000 (11:32 +0300)
committerRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Mon, 18 Mar 2013 16:26:52 +0000 (18:26 +0200)
src/kernel/Kbuild
src/kernel/mptp.c [moved from src/kernel/swift.c with 99% similarity]
src/kernel/mptp.h
src/kernel/swift.h [deleted file]

index cddb47cd85cb607a7ad9c1a1376bf53f28239c90..57f5e50d2da8e79b579d989633f62e573e7a0e02 100644 (file)
@@ -1,3 +1,3 @@
 EXTRA_CFLAGS = -g
 
-obj-m        = swift.o
+obj-m        = mptp.o
similarity index 99%
rename from src/kernel/swift.c
rename to src/kernel/mptp.c
index ba0776b39c8d433e407b4d5c8059ab3fc7e45f18..6f1bddb24f648d8e3610584da186f0f4e16358a1 100644 (file)
@@ -5,7 +5,7 @@
 #include <net/ip.h>
 #include <net/route.h>
 
-#include "swift.h"
+#include "mptp.h"
 #include "debug.h"
 
 MODULE_DESCRIPTION("Multi-Party Transport Protocol");
index b837617d4efe5b8e15633452d6b0e4555b48f95e..59c5b17a26ecfc40b7c76da3bd13ab6746c9a3d5 100644 (file)
@@ -4,27 +4,26 @@
 #define IPPROTO_MPTP 137
 
 #define MIN_MPTP_PORT 1
-#define MAX_MPTP_PORT 65536
+#define MAX_MPTP_PORT 256
 
 #ifndef __KERNEL__
 #include <inttypes.h>
 #endif
 
 struct mptp_dest {
-       uint32_t addr;
-       uint16_t port;
-       uint16_t bytes;
+    uint32_t addr;
+    uint8_t port;
 };
 
 struct sockaddr_mptp {
-       int count;
-       struct mptp_dest dests[0];
+    int count;
+    struct mptp_dest dests[0];
 };
 
 #ifdef __KERNEL__
 struct mptphdr {
-       uint16_t src;
-       uint16_t dst;
+       uint8_t src;
+       uint8_t dst;
        __be16 len;
 };
 #endif
diff --git a/src/kernel/swift.h b/src/kernel/swift.h
deleted file mode 100644 (file)
index 59c5b17..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef _MPTP_H
-#define _MPTP_H
-
-#define IPPROTO_MPTP 137
-
-#define MIN_MPTP_PORT 1
-#define MAX_MPTP_PORT 256
-
-#ifndef __KERNEL__
-#include <inttypes.h>
-#endif
-
-struct mptp_dest {
-    uint32_t addr;
-    uint8_t port;
-};
-
-struct sockaddr_mptp {
-    int count;
-    struct mptp_dest dests[0];
-};
-
-#ifdef __KERNEL__
-struct mptphdr {
-       uint8_t src;
-       uint8_t dst;
-       __be16 len;
-};
-#endif
-
-#endif