The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
packet.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16  */
17 
18 /** Structures and functions for packet manipulation
19  *
20  * @file src/lib/server/packet.h
21  *
22  * copyright 2023 Network RADIUS SAS (legal@networkradius.com)
23  */
24 RCSIDH(server_packet_h, "$Id: 50bd51c5228e98a238e6b83705505d45ad80421b $")
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #include <freeradius-devel/util/packet.h>
31 #include <freeradius-devel/util/socket.h>
32 
33 int fr_packet_pairs_from_packet(TALLOC_CTX *ctx, fr_pair_list_t *list, fr_packet_t const *packet) CC_HINT(nonnull);
34 void fr_packet_pairs_to_packet(fr_packet_t *packet, fr_pair_list_t const *list) CC_HINT(nonnull);
35 
36 int packet_global_init(void);
37 void packet_global_free(void);
38 
39 #ifdef __cplusplus
40 }
41 #endif
#define RCSIDH(h, id)
Definition: build.h:445
int packet_global_init(void)
Initialises the Net.
Definition: packet.c:163
void fr_packet_pairs_to_packet(fr_packet_t *packet, fr_pair_list_t const *list)
Convert pairs to information in a packet.
Definition: packet.c:136
int fr_packet_pairs_from_packet(TALLOC_CTX *ctx, fr_pair_list_t *list, fr_packet_t const *packet)
Allocate a "Net." struct with src/dst host and port.
Definition: packet.c:86
void packet_global_free(void)
Definition: packet.c:176
int nonnull(2, 5))