~ubuntu-branches/ubuntu/natty/freeradius/natty-updates

« back to all changes in this revision

Viewing changes to src/include/radsniff.h

  • Committer: Bazaar Package Importer
  • Author(s): Josip Rodin
  • Date: 2009-11-23 03:57:37 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20091123035737-zsgtzhfych8hir68
Tags: 2.1.7+dfsg-1
* Adopting the package, closes: #536623.
* New upstream version, closes: #513484.
  + Fixes the blooper in unlang evaluation logic, closes: #526175.
* Used quilt (and added README.source), and moved upstream file patching
  into debian/patches/. The source is no longer in collab-maint git
  (to make it simpler for me to finally get this out the door), but
  kept the .gitignore should we need that again.
* Dropped the dialup_admin/bin/backup_radacct patch (integrated upstream).
* Dropped the raddb/Makefile patch (problem no longer exists upstream).
* Dropped the lib/packet.c lib/radius.c main/listen.c patches (was from
  upstream 2.0.5 anyway).
* Dropped references to otp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Dropped references to snmp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Ship /etc/freeradius/modules/* in the freeradius package.
* Stop shipping sites-enabled symlinks in the package and instead create
  them only on initial install, thanks to Matej Vela, closes: #533396.
* Add export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" to the init script
  at the request of John Morrissey, closes: #550143.
* Stop installing /var/run/freeradius in the package to silence Lintian.
  The init script already recreates it at will.
* Remove executable bit from example.pl to silence Lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  radsniff.h  Structures and defines for the RADIUS sniffer.
3
3
 *
4
 
 *  Version:    $Id: radsniff.h,v 1.3 2006/11/14 21:21:46 fcusack Exp $
 
4
 *  Version:    $Id$
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or
7
7
 *  modify it under the terms of the GNU General Public License
22
22
 */
23
23
 
24
24
#include <freeradius-devel/ident.h>
25
 
RCSIDH(radsniff_h, "$Id: radsniff.h,v 1.3 2006/11/14 21:21:46 fcusack Exp $")
 
25
RCSIDH(radsniff_h, "$Id$")
26
26
 
27
27
#include <sys/types.h>
28
28
#include <netinet/in.h>
36
36
 *      Structure of a DEC/Intel/Xerox or 802.3 Ethernet header.
37
37
 */
38
38
struct  ethernet_header {
39
 
        u_int8_t        ethernet_dhost[ETHER_ADDR_LEN];
40
 
        u_int8_t        ethernet_shost[ETHER_ADDR_LEN];
41
 
        u_int16_t       ethernet_type;
 
39
        uint8_t ethernet_dhost[ETHER_ADDR_LEN];
 
40
        uint8_t ethernet_shost[ETHER_ADDR_LEN];
 
41
        uint16_t        ethernet_type;
42
42
};
43
43
 
44
44
/*
53
53
 *      Structure of an internet header, naked of options.
54
54
 */
55
55
struct ip_header {
56
 
        u_int8_t        ip_vhl;         /* header length, version */
 
56
        uint8_t        ip_vhl;         /* header length, version */
57
57
#define IP_V(ip)        (((ip)->ip_vhl & 0xf0) >> 4)
58
58
#define IP_HL(ip)       ((ip)->ip_vhl & 0x0f)
59
 
        u_int8_t        ip_tos;         /* type of service */
60
 
        u_int16_t       ip_len;         /* total length */
61
 
        u_int16_t       ip_id;          /* identification */
62
 
        u_int16_t       ip_off;         /* fragment offset field */
63
 
#define IP_DF 0x4000                    /* dont fragment flag */
 
59
        uint8_t        ip_tos;         /* type of service */
 
60
        uint16_t       ip_len;         /* total length */
 
61
        uint16_t       ip_id;          /* identification */
 
62
        uint16_t       ip_off;         /* fragment offset field */
 
63
#define I_DF 0x4000                    /* dont fragment flag */
64
64
#define IP_MF 0x2000                    /* more fragments flag */
65
65
#define IP_OFFMASK 0x1fff               /* mask for fragmenting bits */
66
 
        u_int8_t        ip_ttl;         /* time to live */
67
 
        u_int8_t        ip_p;           /* protocol */
68
 
        u_int16_t       ip_sum;         /* checksum */
 
66
        uint8_t        ip_ttl;         /* time to live */
 
67
        uint8_t        ip_p;           /* protocol */
 
68
        uint16_t       ip_sum;         /* checksum */
69
69
        struct in_addr  ip_src,ip_dst;  /* source and dest address */
70
70
};
71
71
 
74
74
 *      Per RFC 768, September, 1981.
75
75
 */
76
76
struct udp_header {
77
 
        u_int16_t       udp_sport;               /* source port */
78
 
        u_int16_t       udp_dport;               /* destination port */
79
 
        u_int16_t       udp_ulen;                /* udp length */
80
 
        u_int16_t       udp_sum;                 /* udp checksum */
 
77
        uint16_t       udp_sport;               /* source port */
 
78
        uint16_t       udp_dport;               /* destination port */
 
79
        uint16_t       udp_ulen;                /* udp length */
 
80
        uint16_t       udp_sum;                 /* udp checksum */
81
81
};
82
82
 
83
83
/*