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 
54 /* PPP pkt header struct */
55 typedef struct __attribute__((packed)){
56  uint8_t code;
57  uint8_t id;
59 } ppp_hdr_t;
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif /* NET_PPP_HDR_H */
Functions to work with different byte orders.
Adds include for missing inttype definitions.
Header of a PPP packet.
Definition: hdr.h:55
network_uint16_t length
Length of PPP packet including payload.
Definition: hdr.h:58
uint8_t code
Code of PPP packet.
Definition: hdr.h:56
uint8_t id
Identifier PPP of packet.
Definition: hdr.h:57
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:74