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 
9 #pragma once
10 
23 #include <inttypes.h>
24 
25 #include "byteorder.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
53 /* PPP pkt header struct */
54 typedef struct __attribute__((packed)){
55  uint8_t code;
56  uint8_t id;
58 } ppp_hdr_t;
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
Functions to work with different byte orders.
Adds include for missing inttype definitions.
Header of a PPP packet.
Definition: hdr.h:54
network_uint16_t length
Length of PPP packet including payload.
Definition: hdr.h:57
uint8_t code
Code of PPP packet.
Definition: hdr.h:55
uint8_t id
Identifier PPP of packet.
Definition: hdr.h:56
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:73