2002-07-09 16:24:59 +04:00
|
|
|
/*
|
2007-04-01 16:06:16 +04:00
|
|
|
* Copyright 2006-2007, Haiku, Inc. All Rights Reserved.
|
2006-08-08 16:33:33 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
2002-07-09 16:24:59 +04:00
|
|
|
*/
|
2006-08-08 16:33:33 +04:00
|
|
|
#ifndef _NET_ROUTE_H
|
|
|
|
#define _NET_ROUTE_H
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
|
2006-08-08 16:33:33 +04:00
|
|
|
#include <sys/socket.h>
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
|
2006-08-08 16:33:33 +04:00
|
|
|
#define RTF_UP 0x00000001
|
|
|
|
#define RTF_GATEWAY 0x00000002
|
|
|
|
#define RTF_HOST 0x00000004
|
|
|
|
#define RTF_REJECT 0x00000008
|
|
|
|
#define RTF_DYNAMIC 0x00000010
|
|
|
|
#define RTF_MODIFIED 0x00000020
|
|
|
|
#define RTF_DEFAULT 0x00000080
|
|
|
|
#define RTF_STATIC 0x00000800
|
|
|
|
#define RTF_BLACKHOLE 0x00001000
|
|
|
|
#define RTF_LOCAL 0x00200000
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2008-05-11 01:30:34 +04:00
|
|
|
/* This structure is used to pass routes to and from the network stack
|
|
|
|
* (via struct ifreq) */
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2006-08-08 16:33:33 +04:00
|
|
|
struct route_entry {
|
|
|
|
struct sockaddr *destination;
|
|
|
|
struct sockaddr *mask;
|
|
|
|
struct sockaddr *gateway;
|
2007-04-01 16:06:16 +04:00
|
|
|
struct sockaddr *source;
|
2006-08-08 16:33:33 +04:00
|
|
|
uint32_t flags;
|
|
|
|
uint32_t mtu;
|
2002-07-09 16:24:59 +04:00
|
|
|
};
|
|
|
|
|
2006-08-08 16:33:33 +04:00
|
|
|
#endif /* _NET_ROUTE_H */
|