Hi,

I would like to porpose (see attached patch) the addition of protocol
values for multiplexing and demultiplexing ROHC header compression
packets. The constants in this patch are compliant with RFC 3241 (ROHC
over PPP).

Thanks
Jesus Arango
diff -ruN ../linux-2.6.14.2/drivers/net/ppp_generic.c 
./drivers/net/ppp_generic.c
--- ../linux-2.6.14.2/drivers/net/ppp_generic.c 2005-11-10 22:33:12.000000000 
-0700
+++ ./drivers/net/ppp_generic.c 2005-11-16 06:17:12.000000000 -0700
@@ -60,7 +60,9 @@
 #define NP_AT  3               /* Appletalk protocol */
 #define NP_MPLS_UC 4           /* MPLS unicast */
 #define NP_MPLS_MC 5           /* MPLS multicast */
-#define NUM_NP 6               /* Number of NPs. */
+#define NP_ROHC_SM 6           /* ROHC small-CIDs */
+#define NP_ROHC_LG 7           /* ROHC large-CIDs */
+#define NUM_NP 8               /* Number of NPs. */
 
 #define MPHDRLEN       6       /* multilink protocol header length */
 #define MPHDRLEN_SSN   4       /* ditto with short sequence numbers */
@@ -291,6 +293,10 @@
                return NP_MPLS_UC;
        case PPP_MPLS_MC:
                return NP_MPLS_MC;
+       case PPP_ROHC_SM:
+               return NP_ROHC_SM;
+       case PPP_ROHC_LG:
+               return NP_ROHC_LG;
        }
        return -EINVAL;
 }
@@ -303,6 +309,8 @@
        PPP_AT,
        PPP_MPLS_UC,
        PPP_MPLS_MC,
+       PPP_ROHC_SM,
+       PPP_ROHC_LG,
 };
        
 /* Translates an ethertype into an NP index */
@@ -322,6 +330,10 @@
                return NP_MPLS_UC;
        case ETH_P_MPLS_MC:
                return NP_MPLS_MC;
+       case ETH_P_ROHC_SM:
+               return NP_ROHC_SM;
+       case ETH_P_ROHC_LG:
+               return NP_ROHC_LG;
        }
        return -1;
 }
@@ -334,6 +346,8 @@
        ETH_P_PPPTALK,
        ETH_P_MPLS_UC,
        ETH_P_MPLS_MC,
+       ETH_P_ROHC_SM,
+       ETH_P_ROHC_LG,
 };
 
 /*
diff -ruN ../linux-2.6.14.2/include/linux/if_ether.h ./include/linux/if_ether.h
--- ../linux-2.6.14.2/include/linux/if_ether.h  2005-11-10 22:33:12.000000000 
-0700
+++ ./include/linux/if_ether.h  2005-11-16 06:00:50.000000000 -0700
@@ -92,6 +92,8 @@
 #define ETH_P_ECONET   0x0018          /* Acorn Econet                 */
 #define ETH_P_HDLC     0x0019          /* HDLC frames                  */
 #define ETH_P_ARCNET   0x001A          /* 1A for ArcNet :-)            */
+#define ETH_P_ROHC_SM  0x001B          /* ROHC small-CIDs */
+#define ETH_P_ROHC_LG  0x001C          /* ROHC large-CIDs */
 
 /*
  *     This is an Ethernet frame header.
diff -ruN ../linux-2.6.14.2/include/linux/ppp_defs.h ./include/linux/ppp_defs.h
--- ../linux-2.6.14.2/include/linux/ppp_defs.h  2005-11-10 22:33:12.000000000 
-0700
+++ ./include/linux/ppp_defs.h  2005-11-16 06:14:08.000000000 -0700
@@ -67,6 +67,8 @@
 /*
  * Protocol field values.
  */
+#define PPP_ROHC_SM 0x03    /* ROHC small-CIDs */
+#define PPP_ROHC_LG 0x05    /* ROHC large-CIDs */
 #define PPP_IP         0x21    /* Internet Protocol */
 #define PPP_AT         0x29    /* AppleTalk Protocol */
 #define PPP_IPX                0x2b    /* IPX protocol */
diff -ruN ../linux-2.6.14.2/linux-2.6.14.2-ppp-rohc.patch 
./linux-2.6.14.2-ppp-rohc.patch
--- ../linux-2.6.14.2/linux-2.6.14.2-ppp-rohc.patch     1969-12-31 
17:00:00.000000000 -0700
+++ ./linux-2.6.14.2-ppp-rohc.patch     2005-11-16 06:58:55.066844448 -0700
@@ -0,0 +1,78 @@
+diff -ruN ../linux-2.6.14.2/drivers/net/ppp_generic.c 
./drivers/net/ppp_generic.c
+--- ../linux-2.6.14.2/drivers/net/ppp_generic.c        2005-11-10 
22:33:12.000000000 -0700
++++ ./drivers/net/ppp_generic.c        2005-11-16 06:17:12.000000000 -0700
+@@ -60,7 +60,9 @@
+ #define NP_AT 3               /* Appletalk protocol */
+ #define NP_MPLS_UC 4          /* MPLS unicast */
+ #define NP_MPLS_MC 5          /* MPLS multicast */
+-#define NUM_NP        6               /* Number of NPs. */
++#define NP_ROHC_SM 6          /* ROHC small-CIDs */
++#define NP_ROHC_LG 7          /* ROHC large-CIDs */
++#define NUM_NP        8               /* Number of NPs. */
+ 
+ #define MPHDRLEN      6       /* multilink protocol header length */
+ #define MPHDRLEN_SSN  4       /* ditto with short sequence numbers */
+@@ -291,6 +293,10 @@
+               return NP_MPLS_UC;
+       case PPP_MPLS_MC:
+               return NP_MPLS_MC;
++      case PPP_ROHC_SM:
++              return NP_ROHC_SM;
++      case PPP_ROHC_LG:
++              return NP_ROHC_LG;
+       }
+       return -EINVAL;
+ }
+@@ -303,6 +309,8 @@
+       PPP_AT,
+       PPP_MPLS_UC,
+       PPP_MPLS_MC,
++      PPP_ROHC_SM,
++      PPP_ROHC_LG,
+ };
+       
+ /* Translates an ethertype into an NP index */
+@@ -322,6 +330,10 @@
+               return NP_MPLS_UC;
+       case ETH_P_MPLS_MC:
+               return NP_MPLS_MC;
++      case ETH_P_ROHC_SM:
++              return NP_ROHC_SM;
++      case ETH_P_ROHC_LG:
++              return NP_ROHC_LG;
+       }
+       return -1;
+ }
+@@ -334,6 +346,8 @@
+       ETH_P_PPPTALK,
+       ETH_P_MPLS_UC,
+       ETH_P_MPLS_MC,
++      ETH_P_ROHC_SM,
++      ETH_P_ROHC_LG,
+ };
+ 
+ /*
+diff -ruN ../linux-2.6.14.2/include/linux/if_ether.h ./include/linux/if_ether.h
+--- ../linux-2.6.14.2/include/linux/if_ether.h 2005-11-10 22:33:12.000000000 
-0700
++++ ./include/linux/if_ether.h 2005-11-16 06:00:50.000000000 -0700
+@@ -92,6 +92,8 @@
+ #define ETH_P_ECONET  0x0018          /* Acorn Econet                 */
+ #define ETH_P_HDLC    0x0019          /* HDLC frames                  */
+ #define ETH_P_ARCNET  0x001A          /* 1A for ArcNet :-)            */
++#define ETH_P_ROHC_SM 0x001B          /* ROHC small-CIDs */
++#define ETH_P_ROHC_LG 0x001C          /* ROHC large-CIDs */
+ 
+ /*
+  *    This is an Ethernet frame header.
+diff -ruN ../linux-2.6.14.2/include/linux/ppp_defs.h ./include/linux/ppp_defs.h
+--- ../linux-2.6.14.2/include/linux/ppp_defs.h 2005-11-10 22:33:12.000000000 
-0700
++++ ./include/linux/ppp_defs.h 2005-11-16 06:14:08.000000000 -0700
+@@ -67,6 +67,8 @@
+ /*
+  * Protocol field values.
+  */
++#define PPP_ROHC_SM 0x03    /* ROHC small-CIDs */
++#define PPP_ROHC_LG 0x05    /* ROHC large-CIDs */
+ #define PPP_IP                0x21    /* Internet Protocol */
+ #define PPP_AT                0x29    /* AppleTalk Protocol */
+ #define PPP_IPX               0x2b    /* IPX protocol */

Reply via email to