Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5496 leency 1
#ifndef _NET_ROUTE_H
2
#define _NET_ROUTE_H
3
 
4
#include 
5
#include 
6
 
7
__BEGIN_DECLS
8
 
9
/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
10
struct rtentry {
11
  unsigned long rt_pad1;
12
  struct sockaddr rt_dst;		/* target address		*/
13
  struct sockaddr rt_gateway;	/* gateway addr (RTF_GATEWAY)	*/
14
  struct sockaddr rt_genmask;	/* target network mask (IP)	*/
15
  unsigned short rt_flags;
16
  short rt_pad2;
17
  unsigned long rt_pad3;
18
  void *rt_pad4;
19
  short rt_metric;	/* +1 for binary compatibility!	*/
20
  char *rt_dev;		/* forcing the device at add	*/
21
  unsigned long rt_mtu;	/* per route MTU/Window 	*/
22
#define rt_mss	rt_mtu	/* Compatibility :-(            */
23
  unsigned long rt_window;	/* Window clamping 		*/
24
  unsigned short rt_irtt;	/* Initial RTT			*/
25
};
26
 
27
#define RTF_UP		0x0001		/* route usable		  	*/
28
#define RTF_GATEWAY	0x0002		/* destination is a gateway	*/
29
#define RTF_HOST	0x0004		/* host entry (net otherwise)	*/
30
#define RTF_REINSTATE	0x0008		/* reinstate route after tmout	*/
31
#define RTF_DYNAMIC	0x0010		/* created dyn. (by redirect)	*/
32
#define RTF_MODIFIED	0x0020		/* modified dyn. (by redirect)	*/
33
#define RTF_MTU		0x0040		/* specific MTU for this route	*/
34
#define RTF_MSS		RTF_MTU		/* Compatibility :-(		*/
35
#define RTF_WINDOW	0x0080		/* per route window clamping	*/
36
#define RTF_IRTT	0x0100		/* Initial round trip time	*/
37
#define RTF_REJECT	0x0200		/* Reject route			*/
38
 
39
struct in6_rtmsg {
40
  struct in6_addr rtmsg_dst;
41
  struct in6_addr rtmsg_src;
42
  struct in6_addr rtmsg_gateway;
43
  uint32_t rtmsg_type;
44
  uint16_t rtmsg_dst_len;
45
  uint16_t rtmsg_src_len;
46
  uint32_t rtmsg_metric;
47
  unsigned long int rtmsg_info;
48
  uint32_t rtmsg_flags;
49
  int rtmsg_ifindex;
50
};
51
 
52
__END_DECLS
53
 
54
#endif