Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e2b02cb4
Commit
e2b02cb4
authored
May 08, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MPLS]: Add MPLS support to PPP.
parent
2c71474b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
drivers/net/ppp_generic.c
drivers/net/ppp_generic.c
+15
-1
include/linux/ppp_defs.h
include/linux/ppp_defs.h
+3
-0
No files found.
drivers/net/ppp_generic.c
View file @
e2b02cb4
...
...
@@ -57,7 +57,9 @@
#define NP_IPV6 1
/* Internet Protocol V6 */
#define NP_IPX 2
/* IPX protocol */
#define NP_AT 3
/* Appletalk protocol */
#define NUM_NP 4
/* Number of NPs. */
#define NP_MPLS_UC 4
/* MPLS unicast */
#define NP_MPLS_MC 5
/* MPLS multicast */
#define NUM_NP 6
/* Number of NPs. */
#define MPHDRLEN 6
/* multilink protocol header length */
#define MPHDRLEN_SSN 4
/* ditto with short sequence numbers */
...
...
@@ -281,6 +283,10 @@ static inline int proto_to_npindex(int proto)
return
NP_IPX
;
case
PPP_AT
:
return
NP_AT
;
case
PPP_MPLS_UC
:
return
NP_MPLS_UC
;
case
PPP_MPLS_MC
:
return
NP_MPLS_MC
;
}
return
-
EINVAL
;
}
...
...
@@ -291,6 +297,8 @@ static const int npindex_to_proto[NUM_NP] = {
PPP_IPV6
,
PPP_IPX
,
PPP_AT
,
PPP_MPLS_UC
,
PPP_MPLS_MC
,
};
/* Translates an ethertype into an NP index */
...
...
@@ -306,6 +314,10 @@ static inline int ethertype_to_npindex(int ethertype)
case
ETH_P_PPPTALK
:
case
ETH_P_ATALK
:
return
NP_AT
;
case
ETH_P_MPLS_UC
:
return
NP_MPLS_UC
;
case
ETH_P_MPLS_MC
:
return
NP_MPLS_MC
;
}
return
-
1
;
}
...
...
@@ -316,6 +328,8 @@ static const int npindex_to_ethertype[NUM_NP] = {
ETH_P_IPV6
,
ETH_P_IPX
,
ETH_P_PPPTALK
,
ETH_P_MPLS_UC
,
ETH_P_MPLS_MC
,
};
/*
...
...
include/linux/ppp_defs.h
View file @
e2b02cb4
...
...
@@ -74,12 +74,15 @@
#define PPP_IPV6 0x57
/* Internet Protocol Version 6 */
#define PPP_COMPFRAG 0xfb
/* fragment compressed below bundle */
#define PPP_COMP 0xfd
/* compressed packet */
#define PPP_MPLS_UC 0x0281
/* Multi Protocol Label Switching - Unicast */
#define PPP_MPLS_MC 0x0283
/* Multi Protocol Label Switching - Multicast */
#define PPP_IPCP 0x8021
/* IP Control Protocol */
#define PPP_ATCP 0x8029
/* AppleTalk Control Protocol */
#define PPP_IPXCP 0x802b
/* IPX Control Protocol */
#define PPP_IPV6CP 0x8057
/* IPv6 Control Protocol */
#define PPP_CCPFRAG 0x80fb
/* CCP at link level (below MP bundle) */
#define PPP_CCP 0x80fd
/* Compression Control Protocol */
#define PPP_MPLSCP 0x80fd
/* MPLS Control Protocol */
#define PPP_LCP 0xc021
/* Link Control Protocol */
#define PPP_PAP 0xc023
/* Password Authentication Protocol */
#define PPP_LQR 0xc025
/* Link Quality Report protocol */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment