2 * Copyright (c) 2015 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
15 #ifndef included_vnet_ppp_packet_h
16 #define included_vnet_ppp_packet_h
21 * Copyright (c) 2009 Eliot Dresselhaus
23 * Permission is hereby granted, free of charge, to any person obtaining
24 * a copy of this software and associated documentation files (the
25 * "Software"), to deal in the Software without restriction, including
26 * without limitation the rights to use, copy, modify, merge, publish,
27 * distribute, sublicense, and/or sell copies of the Software, and to
28 * permit persons to whom the Software is furnished to do so, subject to
29 * the following conditions:
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
38 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
39 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
40 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44 See http://www.iana.org/assignments/ppp-numbers.
46 The Point-to-Point Protocol (PPP) Data Link Layer [146,147,175]
47 contains a 16 bit Protocol field to identify the the encapsulated
48 protocol. The Protocol field is consistent with the ISO 3309 (HDLC)
49 extension mechanism for Address fields. All Protocols MUST be
50 assigned such that the least significant bit of the most significant
51 octet equals "0", and the least significant bit of the least
52 significant octet equals "1".
55 #define foreach_ppp_protocol \
57 _ (0x0003, rohc_small_cid) \
58 _ (0x0005, rohc_large_cid) \
61 _ (0x0025, xerox_ns_idp) \
63 _ (0x0029, appletalk) \
65 _ (0x002d, vj_compressed_tcp) \
66 _ (0x002f, vj_uncompressed_tcp) \
70 _ (0x0039, appletalk_eddp) \
71 _ (0x003b, appletalk_smart_buffered) \
72 _ (0x003d, multilink) \
73 _ (0x003f, netbios_framing) \
75 _ (0x0043, timeplex) \
76 _ (0x0045, fujitsu_lblb) \
77 _ (0x0047, dca_remote_lan) \
79 _ (0x004b, sna_over_802_2) \
81 _ (0x004f, ip6_header_compression) \
83 _ (0x0053, encryption) \
84 _ (0x0055, link_encryption) \
87 _ (0x005b, vendor_specific_a) \
88 _ (0x0061, rtp_iphc_full_header) \
89 _ (0x0063, rtp_iphc_compressed_tcp) \
90 _ (0x0065, rtp_iphc_compressed_non_tcp) \
91 _ (0x0067, rtp_iphc_compressed_udp_8) \
92 _ (0x0069, rtp_iphc_compressed_rtp_8) \
93 _ (0x006f, stampede) \
96 _ (0x00c1, ntcits_ipi) \
97 _ (0x00cf, ppp_nlpid) \
98 _ (0x00fb, multilink_compression) \
99 _ (0x00fd, compressed_datagram) \
100 _ (0x0201, 802_1d_hello) \
101 _ (0x0203, ibm_source_routing) \
102 _ (0x0205, dec_lanbridge) \
111 _ (0x0235, apple_client_server) \
112 _ (0x0281, mpls_unicast) \
113 _ (0x0283, mpls_multicast) \
114 _ (0x0285, ieee_p1284_4) \
116 _ (0x0289, multichannel_flow_treatment) \
117 _ (0x2063, rtp_iphc_compressed_tcp_no_delta) \
118 _ (0x2065, rtp_iphc_context_state) \
119 _ (0x2067, rtp_iphc_compressed_udp_16) \
120 _ (0x2069, rtp_iphc_compressed_rtp_16) \
125 _ (0x4009, docsis_dll) \
126 _ (0x400B, cetacean) \
129 _ (0x4025, fibre_channel) \
131 _ (0x405b, vendor_specific_b) \
134 _ (0xc025, link_quality_report) \
135 _ (0xc027, shiva_password) \
139 _ (0xc05b, vendor_specific_password) \
140 _ (0xc081, container_control) \
143 _ (0xc227, extensible_authentication) \
144 _ (0xc229, mitsubishi_security_info) \
145 _ (0xc26f, stampede_authorization) \
146 _ (0xc281, proprietary_authentication_a) \
147 _ (0xc283, proprietary_authentication_b) \
148 _ (0xc481, proprietary_node_id_authentication)
152 #define _(n,f) PPP_PROTOCOL_##f = n,
157 /* PPP Link Control Protocol (LCP) and Internet Protocol Control Protocol (IPCP) Codes
159 The Point-to-Point Protocol (PPP) Link Control Protocol (LCP),
160 the Compression Control Protocol (CCP), Internet Protocol Control
161 Protocol (IPCP), and other control protocols, contain an 8 bit
162 Code field which identifies the type of packet. */
164 #define foreach_ppp_lcp_code \
165 _ (0, vendor_specific) \
166 _ (1, configure_request) \
167 _ (2, configure_ack) \
168 _ (3, configure_nak) \
169 _ (4, configure_reject) \
170 _ (5, terminate_request) \
171 _ (6, terminate_ack) \
173 _ (8, protocol_reject) \
174 _ (9, echo_request) \
176 _ (11, discard_request) \
177 _ (12, identification) \
178 _ (13, time_remaining) \
179 _ (14, reset_request) \
184 /* Set to 0xff 0x03 */
187 /* Layer 3 protocol for this packet. */
191 #endif /* included_vnet_ppp_packet_h */
194 * fd.io coding-style-patch-verification: ON
197 * eval: (c-set-style "gnu")