~yolanda.robla/ubuntu/saucy/freeradius/dep-8-tests

« 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
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20091123035737-snauioz5r9tf8sdr
Tags: upstream-2.1.7+dfsg
ImportĀ upstreamĀ versionĀ 2.1.7+dfsg

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
/*