| 1 | /* -*-c-*- |
| 2 | * |
| 3 | * Definitions for SLIP |
| 4 | * |
| 5 | * (c) 2008 Straylight/Edgeware |
| 6 | */ |
| 7 | |
| 8 | /*----- Licensing notice --------------------------------------------------* |
| 9 | * |
| 10 | * This file is part of Trivial IP Encryption (TrIPE). |
| 11 | * |
| 12 | * TrIPE is free software: you can redistribute it and/or modify it under |
| 13 | * the terms of the GNU General Public License as published by the Free |
| 14 | * Software Foundation; either version 3 of the License, or (at your |
| 15 | * option) any later version. |
| 16 | * |
| 17 | * TrIPE is distributed in the hope that it will be useful, but WITHOUT |
| 18 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 19 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 20 | * for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License |
| 23 | * along with TrIPE. If not, see <https://www.gnu.org/licenses/>. |
| 24 | */ |
| 25 | |
| 26 | #ifndef SLIP_H |
| 27 | #define SLIP_H |
| 28 | |
| 29 | #ifdef __cplusplus |
| 30 | extern "C" { |
| 31 | #endif |
| 32 | |
| 33 | /*----- Magic constants ---------------------------------------------------*/ |
| 34 | |
| 35 | /* --- SLIP protocol --- */ |
| 36 | |
| 37 | #define SL_END 0xc0 /* End-of-packet boundary */ |
| 38 | #define SL_ESC 0xdb /* Next character is magic */ |
| 39 | #define SL_ESCEND 0xdc /* Really meant @SL_END@ */ |
| 40 | #define SL_ESCESC 0xdd /* Really meant @SL_ESC@ */ |
| 41 | |
| 42 | /*----- That's all, folks -------------------------------------------------*/ |
| 43 | |
| 44 | #ifdef __cplusplus |
| 45 | } |
| 46 | #endif |
| 47 | |
| 48 | #endif |