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 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
;
23 PFIB_ENTRY
RouterAddRoute(
24 PIP_ADDRESS NetworkAddress
,
26 PNEIGHBOR_CACHE_ENTRY Router
,
29 PNEIGHBOR_CACHE_ENTRY
RouterGetRoute(PIP_ADDRESS Destination
);
31 NTSTATUS
RouterRemoveRoute(PIP_ADDRESS Target
, PIP_ADDRESS Router
);
33 PFIB_ENTRY
RouterCreateRoute(
34 PIP_ADDRESS NetworkAddress
,
36 PIP_ADDRESS RouterAddress
,
37 PIP_INTERFACE Interface
,
40 NTSTATUS
RouterStartup(
43 NTSTATUS
RouterShutdown(
46 UINT
CountFIBs(PIP_INTERFACE IF
);
48 UINT
CopyFIBs( PIP_INTERFACE IF
, PFIB_ENTRY Target
);
50 #endif /* __ROUTER_H */