IXP1200 Network Processor Family ATM OC-3/12/Ethernet IP Router Example Design
Application Note 37
Modified on: 3/20/02,
4.3.3.4 enet_route_add()
Adds a route with Ethernet destination to the route table.
enet_route_add(char *dest, char *netmask, char *gateway, int itf, int
gateway_da_hi32, int gateway_da_lo16,int gateway_sa_hi16, int gateway_sa_lo32)
4.3.3.5 rt_ent_info()
Displays the available route table information for a given destination address.
rt_ent_info(char *destination)
4.3.3.6 route_delete()
Deletes a route from the route table.
route_delete(char *dest, char *netmask)
4.3.3.7 rt_help ()
Outputs a list of command line RTM functions.
4.3.4 IP Route Table Entry
The IP lookup table entries reside in DRAM. The same table is used for both ATM and Ethernet
destinations. The ATM and Ethernet Receive threads call the macro route_lookup() to obtain an
index in the route table to the table entry. If the ITF field contains the ATM port type bit
(0x80000000), then the entry is interpreted as an ATM destination, otherwise it is an Ethernet
destination.
Parameter Description
char *dest String IP destination, e.g. "1.1.1.1"
char *netmask String netmask, e.g., "255.255.0.0"
char *gateway String next hop gateway, e.g., "255.255.0.0"
int itf Physical interface id (outputport number).
int gateway_da_hi32 High 32 bits of the MAC destination address.
int gateway_da_lo16 Low 16 bits of t he MAC destination address.
int gateway_sa_hi16 High 32 bits of the MAC source address.
int gateway_sa_lo32 Low 16 bits of the MAC source address.
Parameter Description
destination The destination address, in dotted decimal form, of the route entry to display.
Parameter Description
dest String IP destination, e.g. "1.1.1.1"
netmask String netmask, e.g., "255.255.0.0"