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 NET_PPP_HDR_H
22 #define NET_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 /* NET_PPP_HDR_H */
67 
ppp_hdr_t::id
uint8_t id
Identifier PPP of packet.
Definition: hdr.h:58
byteorder.h
Functions to work with different byte orders.
be_uint16_t
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:77
ppp_hdr_t::code
uint8_t code
Code of PPP packet.
Definition: hdr.h:57
ppp_hdr_t
Header of a PPP packet.
Definition: hdr.h:56
ppp_hdr_t::length
network_uint16_t length
Length of PPP packet including payload.
Definition: hdr.h:59
inttypes.h
Adds include for missing inttype definitions.