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 cddb47c..57f5e50 100644 (file)
@@ -1,3 +1,3 @@
 EXTRA_CFLAGS = -g
 
 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 ba0776b..6f1bddb 100644 (file)
@@ -5,7 +5,7 @@
 #include <net/ip.h>
 #include <net/route.h>
 
 #include <net/ip.h>
 #include <net/route.h>
 
-#include "swift.h"
+#include "mptp.h"
 #include "debug.h"
 
 MODULE_DESCRIPTION("Multi-Party Transport Protocol");
 #include "debug.h"
 
 MODULE_DESCRIPTION("Multi-Party Transport Protocol");
index b837617..59c5b17 100644 (file)
@@ -4,27 +4,26 @@
 #define IPPROTO_MPTP 137
 
 #define MIN_MPTP_PORT 1
 #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 {
 
 #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 {
 };
 
 struct sockaddr_mptp {
-       int count;
-       struct mptp_dest dests[0];
+    int count;
+    struct mptp_dest dests[0];
 };
 
 #ifdef __KERNEL__
 struct mptphdr {
 };
 
 #ifdef __KERNEL__
 struct mptphdr {
-       uint16_t src;
-       uint16_t dst;
+       uint8_t src;
+       uint8_t dst;
        __be16 len;
 };
 #endif
        __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