]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
More comments on contents of hard-coded oNCP packets
authorDaniel Lenski <dlenski@gmail.com>
Fri, 30 Jun 2023 21:12:27 +0000 (14:12 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Fri, 30 Jun 2023 21:21:23 +0000 (14:21 -0700)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
oncp.c

diff --git a/oncp.c b/oncp.c
index 25354a1ad2d42822653b40b996972b3c38499cc3..a81756010249f93375d4835e4beb4e92a087cc76 100644 (file)
--- a/oncp.c
+++ b/oncp.c
@@ -327,12 +327,12 @@ static const unsigned char kmp_tail[] = { 0x01, 0x00, 0x00, 0x00, 0x00,
 static const unsigned char kmp_tail_out[] = { 0x01, 0x00, 0x00, 0x00, 0x01,
                                              0x00, 0x00, 0x00, 0x00, 0x00 };
 static const unsigned char data_hdr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                                         0x01, 0x2c, 0x01, 0x00, 0x00, 0x00,
+                                         0x01, 0x2c, 0x01, 0x00, 0x00, 0x00, /* KMP message ID = 300 (0x12c) */
                                          0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };
 
 #ifdef HAVE_ESP
 static const unsigned char esp_kmp_hdr[] = {
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2e,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2e, /* KMP message ID = 302 (0x12e) */
        0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, /* KMP header */
        0x00, 0x56, /* KMP length */
        0x00, 0x07, 0x00, 0x00, 0x00, 0x50, /* TLV group 7 */
@@ -347,14 +347,14 @@ static const unsigned char esp_kmp_part2[] = {
 static const struct pkt esp_enable_pkt = {
        .next = NULL,
        { .oncp = { .rec = { 0x21, 0x00 },
-                   .kmp = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2f,
+                   .kmp = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2f, /* KMP message ID = 303 (0x12f), len = 13 (0x0d) */
                             0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
                             0x00, 0x00, 0x00, 0x0d } }
        },
        .data = {
                0x00, 0x06, 0x00, 0x00, 0x00, 0x07, /* Group 6, len 7 */
                0x00, 0x01, 0x00, 0x00, 0x00, 0x01, /* Attr 1, len 1 */
-               0x01
+               0x01                                /* Value (1 to enable ESP, 0 to disable) */
        },
        .len = 13
 };