]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
combine comments from heretofore missing ppp.h
authorDaniel Lenski <dlenski@gmail.com>
Wed, 13 May 2020 14:28:28 +0000 (07:28 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Wed, 13 May 2020 14:28:28 +0000 (07:28 -0700)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
ppp.h

diff --git a/ppp.h b/ppp.h
index c42ab842995e6141798a7e7ff130480dec7c0477..6a4e3a1d01e4f22a745934b9e0ce4839d3119d1e 100644 (file)
--- a/ppp.h
+++ b/ppp.h
 #ifndef __OPENCONNECT_PPP_H__
 #define __OPENCONNECT_PPP_H__
 
-#include <config.h>
-
-#include "openconnect-internal.h"
-
+/* PPP protocol field values */
 #define PPP_LCP                0xc021
 #define PPP_IPCP       0x8021
 #define PPP_IP6CP      0x8057
 #define PPP_IP         0x21
 #define PPP_IP6                0x57
 
+/* NCP packet formats (https://tools.ietf.org/html/rfc1661#section-3.2) */
 #define CONFREQ 1
 #define CONFACK 2
 #define CONFNAK 3
 #define ECHOREP 10
 #define DISCREQ 11
 
+/* HDLC (https://tools.ietf.org/html/rfc1662) */
 #define PPPINITFCS16    0xffff  /* Initial FCS value */
 #define PPPGOODFCS16    0xf0b8  /* Good final FCS value */
+#define ASYNCMAP_LCP 0xffffffffUL /* When sending LCP, always escape characters < 0x20 */
 
-/* When sending LCP, always escape characters < 0x20 */
-#define ASYNCMAP_LCP 0xffffffffUL
-
-/* Our own flag values, not wire protocol */
-#define ACCOMP 1
-#define PFCOMP 2
-#define VJCOMP 4
+/* Negotiable options (our own values, not wire protocol) */
+#define ACCOMP 1               /* https://tools.ietf.org/html/rfc1661#section-6.6 */
+#define PFCOMP 2               /* https://tools.ietf.org/html/rfc1661#section-6.5 */
+#define VJCOMP 4               /* https://tools.ietf.org/html/rfc1332#section-4 */
 
+/* PPP states (https://tools.ietf.org/html/rfc1661#section-3.2) */
 #define PPPS_DEAD              0
 #define PPPS_ESTABLISH         1
 #define PPPS_OPENED            2
@@ -58,6 +56,7 @@
 #define PPPS_NETWORK           4
 #define PPPS_TERMINATE         5
 
+/* NCP states */
 #define NCP_CONF_REQ_RECEIVED  1
 #define NCP_CONF_REQ_SENT      2
 #define NCP_CONF_ACK_RECEIVED  4