CS43 Lab7 - A Router Stack
1.2019
|
Data structures and methods for handeling interfaces. More...
#include "sr_protocol.h"
Go to the source code of this file.
Classes | |
struct | sr_if |
A node in the interface list of the router. More... | |
Functions | |
struct sr_if * | sr_get_interface (struct sr_instance *sr, const char *name) |
Searches the interface list to find the interface with the given name. More... | |
void | sr_add_interface (struct sr_instance *, const char *) |
void | sr_set_ether_addr (struct sr_instance *, const unsigned char *) |
void | sr_set_ether_ip (struct sr_instance *, uint32_t ip_nbo) |
void | sr_print_if_list (struct sr_instance *) |
Prints the interface list. | |
void | sr_print_if (struct sr_if *) |
Prints the given interface. | |
Data structures and methods for handeling interfaces.
struct sr_if* sr_get_interface | ( | struct sr_instance * | sr, |
const char * | name | ||
) |
Searches the interface list to find the interface with the given name.
If no such interface exists, returns NULL.
sr | The router instance. |
name | The name of the requested interface. |