All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
udpfromto.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
15  */
16 #ifndef _FR_UDPFROMTO_H
17 #define _FR_UDPFROMTO_H
18 /**
19  * $Id: a07f4e537bb625672a0e803afdb714f15d0987f3 $
20  *
21  * @file include/udpfromto.h
22  * @brief Abstract API for sending and receiving packets on unconnected UDP sockets.
23  *
24  * @copyright 2015 The FreeRADIUS server project
25  */
26 RCSIDH(udpfromto_h, "$Id: a07f4e537bb625672a0e803afdb714f15d0987f3 $")
27 
28 #include <freeradius-devel/libradius.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #ifdef WITH_UDPFROMTO
35 int udpfromto_init(int s);
36 int recvfromto(int s, void *buf, size_t len, int flags,
37  struct sockaddr *from, socklen_t *fromlen,
38  struct sockaddr *to, socklen_t *tolen,
39  int *if_index, struct timeval *when);
40 int sendfromto(int s, void *buf, size_t len, int flags,
41  struct sockaddr *from, socklen_t fromlen,
42  struct sockaddr *to, socklen_t tolen,
43  int if_index);
44 #endif
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 #endif /* _FR_UDPFROMTO_H */
#define RCSIDH(h, id)
Definition: build.h:136