hdr.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 José Ignacio Alamos <jialamos@uc.cl>
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
20 #include <inttypes.h>
21 
22 #include "byteorder.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
50 /* PPP pkt header struct */
51 typedef struct __attribute__((packed)){
52  uint8_t code;
53  uint8_t id;
55 } ppp_hdr_t;
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
Functions to work with different byte orders.
Adds include for missing inttype definitions.
Header of a PPP packet.
Definition: hdr.h:51
network_uint16_t length
Length of PPP packet including payload.
Definition: hdr.h:54
uint8_t code
Code of PPP packet.
Definition: hdr.h:52
uint8_t id
Identifier PPP of packet.
Definition: hdr.h:53
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:70