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
13 /* Forward Information Base Entry */
14 typedef struct _FIB_ENTRY
{
15 LIST_ENTRY ListEntry
; /* Entry on list */
16 ULONG RefCount
; /* Reference count */
17 PIP_ADDRESS NetworkAddress
; /* Address of network */
18 PIP_ADDRESS Netmask
; /* Netmask of network */
19 PNET_TABLE_ENTRY NTE
; /* Pointer to NTE to use */
20 PNEIGHBOR_CACHE_ENTRY Router
; /* Pointer to NCE of router to use */
21 UINT Metric
; /* Cost of this route */
22 } FIB_ENTRY
, *PFIB_ENTRY
;
25 PNET_TABLE_ENTRY
RouterFindBestNTE(
26 PIP_INTERFACE Interface
,
27 PIP_ADDRESS Destination
);
29 PIP_INTERFACE
RouterFindOnLinkInterface(
31 PNET_TABLE_ENTRY NTE
);
33 PFIB_ENTRY
RouterAddRoute(
34 PIP_ADDRESS NetworkAddress
,
37 PNEIGHBOR_CACHE_ENTRY Router
,
40 PNEIGHBOR_CACHE_ENTRY
RouterGetRoute(
41 PIP_ADDRESS Destination
,
42 PNET_TABLE_ENTRY NTE
);
44 VOID
RouterRemoveRoute(
47 PFIB_ENTRY
RouterCreateRouteIPv4(
48 IPv4_RAW_ADDRESS NetworkAddress
,
49 IPv4_RAW_ADDRESS Netmask
,
50 IPv4_RAW_ADDRESS RouterAddress
,
54 NTSTATUS
RouterStartup(
57 NTSTATUS
RouterShutdown(
60 #endif /* __ROUTER_H */