/*
* radutmp.h Definitions for the Radius UTMP file.
*
- * Version: @(#)radutmp 2.01 11-Feb-1998 miquels@cistron.nl
+ * Version: $Id$
*/
#ifndef _RADUTMP_H
#define _RADUTMP_H
+#include <freeradius-devel/ident.h>
+RCSIDH(radutmp_h, "$Id$")
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Types of connection.
*/
#define P_IDLE 0
#define P_LOGIN 1
-#define RUT_NAMESIZE 32
-
struct radutmp {
char login[32]; /* Loginname */
/* FIXME: extend to 48 or 64 bytes */
- int nas_port; /* Port on the terminal server (32 bits). */
+ unsigned int nas_port; /* Port on the terminal server (32 bits). */
char session_id[8]; /* Radius session ID (first 8 bytes at least)*/
/* FIXME: extend to 16 or 32 bytes */
unsigned int nas_address; /* IP of portmaster. */
char reserved[12]; /* 3 ints reserved */
};
+/*
+ * Take the size of the structure from the actual structure definition.
+ */
+#define RUT_NAMESIZE sizeof(((struct radutmp *) NULL)->login)
+#define RUT_SESSSIZE sizeof(((struct radutmp *) NULL)->session_id)
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RADUTMP_H */