/usr/include/freeradius/dhcp.h is in libfreeradius-dev 2.2.8+dfsg-0.1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | #ifndef FR_DHCP_H
#define FR_DHCP_H
/*
* dhcp.h Structures and prototypes for DHCP.
* Why DHCP in a RADIUS server?
* Why not?
*
* Version: $Id$
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* Copyright 2008 The FreeRADIUS server project
* Copyright 2008 Alan DeKok <aland@deployingradius.com>
*/
#include <freeradius/ident.h>
RCSIDH(dhcp_h, "$Id$")
#ifdef __cplusplus
extern "C" {
#endif
/*
* Not for production use.
*/
RADIUS_PACKET *fr_dhcp_recv(int sockfd);
int fr_dhcp_send(RADIUS_PACKET *packet);
int fr_dhcp_add_arp_entry(int fd, const char *interface, VALUE_PAIR *hwvp, VALUE_PAIR *clvp);
int fr_dhcp_encode(RADIUS_PACKET *packet);
ssize_t fr_dhcp_decode_options(uint8_t *data, size_t len, VALUE_PAIR **head);
int fr_dhcp_decode(RADIUS_PACKET *packet);
/*
* This is a horrible hack.
*/
#define PW_DHCP_OFFSET (1024)
#define PW_DHCP_DISCOVER (1024 + 1)
#define PW_DHCP_OFFER (1024 + 2)
#define PW_DHCP_REQUEST (1024 + 3)
#define PW_DHCP_DECLINE (1024 + 4)
#define PW_DHCP_ACK (1024 + 5)
#define PW_DHCP_NAK (1024 + 6)
#define PW_DHCP_RELEASE (1024 + 7)
#define PW_DHCP_INFORM (1024 + 8)
#define DHCP_MAGIC_VENDOR (54)
#define DHCP2ATTR(x) ((DHCP_MAGIC_VENDOR << 16) | (x))
#define ATTR2DHCP(x) ((x) & 0xff)
#define IS_DHCP_ATTR(x) (VENDOR((x)->attribute) == DHCP_MAGIC_VENDOR)
#define PW_DHCP_OPTION_82 (82)
#define DHCP_PACK_OPTION1(x,y) ((x) | ((y) << 8))
#define DHCP_BASE_ATTR(x) (x & 0xff)
#define DHCP_UNPACK_OPTION1(x) (((x) & 0xff00) >> 8)
#ifdef __cplusplus
}
#endif
#endif /* FR_DHCP_H */
|