- *(u8 *)(q + 1) = (time_now % 255) + 1; // ID
- *(u16 *)(q + 2) = htons(14); // Length
- *(u8 *)(q + 4) = 5;
- *(u8 *)(q + 5) = 6;
- *(u32 *)(q + 6) = htonl(session[s].magic);
- *(u8 *)(q + 10) = 3;
- *(u8 *)(q + 11) = 4;
- *(u16 *)(q + 12) = htons(PPPPAP); // PAP
- tunnelsend(b, 12 + 14, t);
+ *(uint8_t *)(q + 1) = (time_now % 255) + 1; // ID
+ *(uint16_t *)(q + 2) = htons(14); // Length
+ *(uint8_t *)(q + 4) = 5;
+ *(uint8_t *)(q + 5) = 6;
+ *(uint32_t *)(q + 6) = htonl(session[s].magic);
+ *(uint8_t *)(q + 10) = 3;
+ *(uint8_t *)(q + 11) = 4;
+ *(uint16_t *)(q + 12) = htons(PPPPAP); // PAP
+
+ LOG_HEX(5, "PPPLCP", q, 14);
+ tunnelsend(b, (q - b) + 14, t);
+}
+
+// Send CCP request for no compression
+static void initccp(tunnelidt t, sessionidt s)
+{
+ char b[500], *q;
+
+ if (!(q = makeppp(b, sizeof(b), NULL, 0, t, s, PPPCCP)))
+ return;
+
+ LOG(4, s, t, "Sending CCP ConfigReq for no compression\n");
+ *q = ConfigReq;
+ *(uint8_t *)(q + 1) = (time_now % 255) + 1; // ID
+ *(uint16_t *)(q + 2) = htons(4); // Length
+
+ LOG_HEX(5, "PPPCCP", q, 4);
+ tunnelsend(b, (q - b) + 4 , t);