X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FIp4Dxe%2FIp4Route.h;h=bc396f94b42bbd9a0a302bd395c974f561fccfbd;hp=c60a5ee727388cc9854deecfbc7377666ca8314b;hb=4cda7726e5fd30aaf3e05c80207ae1b264bfa123;hpb=5f778b1f69b6931b4dce8017c50e8937873ea94e diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h index c60a5ee727..bc396f94b4 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h @@ -26,22 +26,22 @@ Abstract: #include "Ip4Common.h" -enum { +typedef enum { IP4_DIRECT_ROUTE = 0x00000001, IP4_ROUTE_CACHE_HASH = 31, IP4_ROUTE_CACHE_MAX = 64 // Max NO. of cache entry per hash bucket -}; +} IP4_ROUTE_ENUM_TYPES; #define IP4_ROUTE_CACHE_HASH(Dst, Src) (((Dst) ^ (Src)) % IP4_ROUTE_CACHE_HASH) -// -// The route entry in the route table. Dest/Netmask is the destion -// network. The nexthop is the gateway to send the packet to in -// order to reach the Dest/Netmask. If the Flag has IP4_DIRECT_ROUTE -// on, the gateway is the destination of the IP packet itself. Route -// enties of the connected network have the flag on. -// +/// +/// The route entry in the route table. Dest/Netmask is the destion +/// network. The nexthop is the gateway to send the packet to in +/// order to reach the Dest/Netmask. If the Flag has IP4_DIRECT_ROUTE +/// on, the gateway is the destination of the IP packet itself. Route +/// enties of the connected network have the flag on. +/// typedef struct { LIST_ENTRY Link; INTN RefCnt; @@ -51,16 +51,16 @@ typedef struct { UINT32 Flag; } IP4_ROUTE_ENTRY; -// -// The route cache entry. The route cache entry is optional. -// But it is necessary to support the ICMP redirect message. -// Check Ip4ProcessIcmpRedirect for information. -// -// The cache entry field Tag is used to tag all the route -// cache entry spawned from a route table entry. This makes -// it simple to delete all the route cache entries from a -// to-be-deleted route entry. -// +/// +/// The route cache entry. The route cache entry is optional. +/// But it is necessary to support the ICMP redirect message. +/// Check Ip4ProcessIcmpRedirect for information. +/// +/// The cache entry field Tag is used to tag all the route +/// cache entry spawned from a route table entry. This makes +/// it simple to delete all the route cache entries from a +/// to-be-deleted route entry. +/// typedef struct { LIST_ENTRY Link; INTN RefCnt; @@ -70,25 +70,25 @@ typedef struct { UINTN Tag; } IP4_ROUTE_CACHE_ENTRY; -// -// The route cache table is organized as a hash table. Each -// IP4 route table has a embedded route cache. For now the -// route cache and route table are binded togehter. But keep -// the route cache a seperated structure in case we want to -// detach them later. -// +/// +/// The route cache table is organized as a hash table. Each +/// IP4 route table has a embedded route cache. For now the +/// route cache and route table are binded togehter. But keep +/// the route cache a seperated structure in case we want to +/// detach them later. +/// typedef struct { LIST_ENTRY CacheBucket[IP4_ROUTE_CACHE_HASH]; } IP4_ROUTE_CACHE; -// -// Each IP4 instance has its own route table. Each ServiceBinding -// instance has a default route table and default address. -// -// All the route table entries with the same mask are linked -// together in one route area. For example, RouteArea[0] contains -// the default routes. A route table also contains a route cache. -// +/// +/// Each IP4 instance has its own route table. Each ServiceBinding +/// instance has a default route table and default address. +/// +/// All the route table entries with the same mask are linked +/// together in one route area. For example, RouteArea[0] contains +/// the default routes. A route table also contains a route cache. +/// typedef struct _IP4_ROUTE_TABLE IP4_ROUTE_TABLE; struct _IP4_ROUTE_TABLE {