Bring back ext2 code from branch
[reactos.git] / reactos / drivers / network / tcpip / include / router.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
4 * FILE: include/router.h
5 * PURPOSE: IP routing definitions
6 */
7 #ifndef __ROUTER_H
8 #define __ROUTER_H
9
10 #include <neighbor.h>
11
12
13 /* Forward Information Base Entry */
14 typedef struct _FIB_ENTRY {
15 LIST_ENTRY ListEntry; /* Entry on list */
16 OBJECT_FREE_ROUTINE Free; /* Routine used to free resources for the object */
17 IP_ADDRESS NetworkAddress; /* Address of network */
18 IP_ADDRESS Netmask; /* Netmask of network */
19 PNEIGHBOR_CACHE_ENTRY Router; /* Pointer to NCE of router to use */
20 UINT Metric; /* Cost of this route */
21 } FIB_ENTRY, *PFIB_ENTRY;
22
23 PFIB_ENTRY RouterAddRoute(
24 PIP_ADDRESS NetworkAddress,
25 PIP_ADDRESS Netmask,
26 PNEIGHBOR_CACHE_ENTRY Router,
27 UINT Metric);
28
29 PNEIGHBOR_CACHE_ENTRY RouterGetRoute(PIP_ADDRESS Destination);
30
31 NTSTATUS RouterRemoveRoute(PIP_ADDRESS Target, PIP_ADDRESS Router);
32
33 PFIB_ENTRY RouterCreateRoute(
34 PIP_ADDRESS NetworkAddress,
35 PIP_ADDRESS Netmask,
36 PIP_ADDRESS RouterAddress,
37 PIP_INTERFACE Interface,
38 UINT Metric);
39
40 NTSTATUS RouterStartup(
41 VOID);
42
43 NTSTATUS RouterShutdown(
44 VOID);
45
46 UINT CountFIBs(VOID);
47
48 UINT CopyFIBs( PFIB_ENTRY Target );
49
50 #endif /* __ROUTER_H */
51
52 /* EOF */