The friendly Operating System for the Internet of Things
ppp/hdr.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 José Ignacio Alamos <jialamos@uc.cl>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
21 #ifndef PPP_HDR_H
22 #define PPP_HDR_H
23 
24 #include <inttypes.h>
25 
26 #include "byteorder.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 
55 /* PPP pkt header struct */
56 typedef struct __attribute__((packed)){
57  uint8_t code;
58  uint8_t id;
60 } ppp_hdr_t;
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif /* PPP_HDR_H */
67 
uint8_t id
Identifier PPP of packet.
Definition: ppp/hdr.h:58
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:76
Header of a PPP packet.
Definition: ppp/hdr.h:56
network_uint16_t length
Length of PPP packet including payload.
Definition: ppp/hdr.h:59
uint8_t code
Code of PPP packet.
Definition: ppp/hdr.h:57
Functions to work with different byte orders.
Adds include for missing inttype definitions.