- Merge 54929, 54930, 54932, 54933, 54934, 54939, 54941, 54942, 54944, 54945, 54946...
[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
8 #pragma once
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 VOID RouterRemoveRoutesForInterface(PIP_INTERFACE Interface);
47
48 UINT CountFIBs(PIP_INTERFACE IF);
49
50 UINT CopyFIBs( PIP_INTERFACE IF, PFIB_ENTRY Target );
51
52 /* EOF */