Subversion Repositories HelenOS

Rev

Rev 4505 | Rev 4722 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4505 Rev 4704
Line 29... Line 29...
29
/** @addtogroup ip
29
/** @addtogroup ip
30
 *  @{
30
 *  @{
31
 */
31
 */
32
 
32
 
33
/** @file
33
/** @file
34
 *  Internet protocol header and options definitions.
34
 *  IP header and options definitions.
35
 *  Names according to the linux src/include/linux/ip.h header file.
35
 *  Names according to the linux src/include/linux/ip.h header file.
36
 */
36
 */
37
 
37
 
38
#ifndef __NET_IP_HEADER_H__
38
#ifndef __NET_IP_HEADER_H__
39
#define __NET_IP_HEADER_H__
39
#define __NET_IP_HEADER_H__
Line 85... Line 85...
85
    /** An identifying value assigned by the sender to aid in assembling the fragments of a~datagram.
85
    /** An identifying value assigned by the sender to aid in assembling the fragments of a~datagram.
86
     */
86
     */
87
    uint16_t    identification;
87
    uint16_t    identification;
88
#ifdef ARCH_IS_BIG_ENDIAN
88
#ifdef ARCH_IS_BIG_ENDIAN
89
    /** Various control flags.
89
    /** Various control flags.
-
 
90
     *  @see
90
     */
91
     */
91
    uint16_t    flags:3;
92
    uint16_t    flags:3;
92
    /** This field indicates where in the datagram this fragment belongs.
93
    /** This field indicates where in the datagram this fragment belongs.
93
     */
94
     */
94
    uint16_t    fragment_offset:3;
95
    uint16_t    fragment_offset:3;
Line 163... Line 164...
163
     */
164
     */
164
    uint8_t overflow:4;
165
    uint8_t overflow:4;
165
#endif
166
#endif
166
} __attribute__ ((packed));
167
} __attribute__ ((packed));
167
 
168
 
-
 
169
/** @name IP flags definitions
-
 
170
 */
-
 
171
/*@{*/
-
 
172
 
-
 
173
/** Fragment flag field shift.
-
 
174
 */
168
#define IPFLAG_FRAGMENT_SHIFT       1
175
#define IPFLAG_FRAGMENT_SHIFT       1
-
 
176
 
-
 
177
/** Fragmented flag field shift.
-
 
178
 */
169
#define IPFLAG_FRAGMENTED_SHIFT     0
179
#define IPFLAG_FRAGMENTED_SHIFT     0
170
 
180
 
-
 
181
/** May fragment flag value.
-
 
182
 *  Allows the packet fragmentation.
-
 
183
 */
171
#define IPFLAG_MAY_FRAGMENT         ( 0x0 << IPFLAG_FRAGMENT_SHIFT )
184
#define IPFLAG_MAY_FRAGMENT         ( 0x0 << IPFLAG_FRAGMENT_SHIFT )
-
 
185
 
-
 
186
/** Don't fragment flag value.
-
 
187
 *  Permits the packet fragmentation.
-
 
188
 */
172
#define IPFLAG_DONT_FRAGMENT        ( 0x1 << IPFLAG_FRAGMENT_SHIFT )
189
#define IPFLAG_DONT_FRAGMENT        ( 0x1 << IPFLAG_FRAGMENT_SHIFT )
173
 
190
 
-
 
191
/** Last fragment flag value.
-
 
192
 *  Indicates the last packet fragment.
-
 
193
 */
174
#define IPFLAG_LAST_FRAGMENT        ( 0x0 << IPFLAG_FRAGMENTED_SHIFT )
194
#define IPFLAG_LAST_FRAGMENT        ( 0x0 << IPFLAG_FRAGMENTED_SHIFT )
-
 
195
 
-
 
196
/** More fragments flag value.
-
 
197
 *  Indicates that more packet fragments follow.
-
 
198
 */
175
#define IPFLAG_MORE_FRAGMENTS       ( 0x1 << IPFLAG_FRAGMENTED_SHIFT )
199
#define IPFLAG_MORE_FRAGMENTS       ( 0x1 << IPFLAG_FRAGMENTED_SHIFT )
176
 
200
 
-
 
201
/*@}*/
-
 
202
 
177
/*
203
/*
178
#define IPOPT_OPTVAL 0
204
#define IPOPT_OPTVAL 0
179
#define IPOPT_OLEN   1
205
#define IPOPT_OLEN   1
180
#define IPOPT_OFFSET 2
206
#define IPOPT_OFFSET 2
181
#define IPOPT_MINOFF 4
207
#define IPOPT_MINOFF 4