![]() |
NetSim Source Code Help
|

Go to the source code of this file.
Data Structures | |
| struct | stru_eth_packet |
| struct | stru_eth_bpdu |
| struct | ieee802_1q_tag |
| struct | stru_SwitchTable |
| struct | stru_eth_interface_var |
| struct | stru_ethernet_spt |
| struct | stru_ethernet_lan |
| struct | stru_ethernet_var |
| struct | stru_eth_phy |
Macros | |
| #define | isETHConfigured(d, i) (DEVICE_MACLAYER(d,i)->nMacProtocolId == MAC_PROTOCOL_IEEE802_3) |
| #define | ETH_IFG 0.960 |
| #define | ETH_HDR_CBPDU 1 |
| #define | ETH_HDR_VID 2 |
| #define | ETH_HDR_NW 3 |
| #define | ETH_BPDU_LEN 60 |
| #define | IEEE801_1Q_TAG_LEN 4 |
| #define | VLAN_TPID 0x8100 |
| #define | SWITCHTABLE_ALLOC() (ptrSWITCHTABLE)list_alloc(sizeof(SWITCHTABLE),offsetof(SWITCHTABLE,ele)) |
| #define | SWITCHTABLE_ADD(l, m) LIST_ADD_LAST((void**)(l),m) |
| #define | SWITCHTABLE_NEXT(t) t=(ptrSWITCHTABLE)LIST_NEXT(t) |
| #define | SWITCHTABLE_GET(d, in) (GET_ETH_LAN(d,in,0)->switchTable) |
| #define | SWITCHTABLE_GET_LAN(lan) (lan->switchTable) |
| #define | ETH_PHY_GET(d, i) ((ptrETH_PHY)DEVICE_PHYLAYER(d,i)->phyVar) |
Typedefs | |
| typedef enum enum_eth_packet | ETH_PACKET |
| typedef enum enum_SwitchingTechnique | SWITCHING_TECHNIQUE |
| typedef enum enum_PortState | SWITCH_PORTSTATE |
| typedef enum enum_port_type | SWITCH_PORTTYPE |
| typedef struct stru_ethernet_lan | ETH_LAN |
| typedef struct stru_ethernet_lan * | ptrETH_LAN |
| typedef struct stru_eth_packet | ETH_HDR |
| typedef struct stru_eth_packet * | ptrETH_HDR |
| typedef struct stru_eth_bpdu | ETH_BPDU |
| typedef struct stru_eth_bpdu * | ptrETH_BPDU |
| typedef struct ieee802_1q_tag | IEEE801_1Q_TAG |
| typedef struct ieee802_1q_tag * | ptrIEEE801_1Q_TAG |
| typedef struct stru_SwitchTable | SWITCHTABLE |
| typedef struct stru_SwitchTable * | ptrSWITCHTABLE |
| typedef struct stru_eth_interface_var | ETH_IF |
| typedef struct stru_eth_interface_var * | ptrETH_IF |
| typedef struct stru_ethernet_spt | ETH_SPT |
| typedef struct stru_ethernet_spt * | ptrETH_SPT |
| typedef struct stru_ethernet_var | ETH_VAR |
| typedef struct stru_ethernet_var * | ptrETH_VAR |
| typedef struct stru_eth_phy | ETH_PHY |
| typedef struct stru_eth_phy * | ptrETH_PHY |
Enumerations | |
| enum | enum_eth_packet { ETH_CONFIGBPDU = MAC_PROTOCOL_IEEE802_3 * 100 + 1 } |
| enum | enum_SwitchingTechnique { SWITCHINGTECHNIQUE_NULL , SWITCHINGTECHNIQUE_STORE_FORWARD , SWITCHINGTECHNIQUE_CUT_THROUGH , SWITCHINGTECHNIQUE_FRAGMENT_FREE } |
| enum | enum_PortState { PORTSTATE_DISABLED , PORTSTATE_LISTENING , PORTSTATE_LEARNING , PORTSTATE_FORWARDING , PORTSTATE_BLOCKING } |
| enum | enum_port_type { PORTTYPE_DESIGNATED , PORTTYPE_NONDESIGNATED , PORTTYPE_ROOT } |
| enum | VLANPORT { VLANPORT_NONE , VLANPORT_ACCESS , VLANPORT_TRUNK } |
Variables | |
| PNETSIM_MACADDRESS | multicastSPTMAC |
| #define ETH_BPDU_LEN 60 |
Definition at line 104 of file Ethernet.h.
| #define ETH_HDR_CBPDU 1 |
Definition at line 75 of file Ethernet.h.
| #define ETH_HDR_NW 3 |
Definition at line 77 of file Ethernet.h.
| #define ETH_HDR_VID 2 |
Definition at line 76 of file Ethernet.h.
| #define ETH_IFG 0.960 |
Definition at line 38 of file Ethernet.h.
| #define ETH_PHY_GET | ( | d, | |
| i | |||
| ) | ((ptrETH_PHY)DEVICE_PHYLAYER(d,i)->phyVar) |
Definition at line 224 of file Ethernet.h.
| #define IEEE801_1Q_TAG_LEN 4 |
Definition at line 113 of file Ethernet.h.
| #define isETHConfigured | ( | d, | |
| i | |||
| ) | (DEVICE_MACLAYER(d,i)->nMacProtocolId == MAC_PROTOCOL_IEEE802_3) |
Definition at line 34 of file Ethernet.h.
| #define SWITCHTABLE_ADD | ( | l, | |
| m | |||
| ) | LIST_ADD_LAST((void**)(l),m) |
Definition at line 125 of file Ethernet.h.
| #define SWITCHTABLE_ALLOC | ( | ) | (ptrSWITCHTABLE)list_alloc(sizeof(SWITCHTABLE),offsetof(SWITCHTABLE,ele)) |
Definition at line 124 of file Ethernet.h.
| #define SWITCHTABLE_GET | ( | d, | |
| in | |||
| ) | (GET_ETH_LAN(d,in,0)->switchTable) |
Definition at line 127 of file Ethernet.h.
| #define SWITCHTABLE_GET_LAN | ( | lan | ) | (lan->switchTable) |
Definition at line 128 of file Ethernet.h.
| #define SWITCHTABLE_NEXT | ( | t | ) | t=(ptrSWITCHTABLE)LIST_NEXT(t) |
Definition at line 126 of file Ethernet.h.
| #define VLAN_TPID 0x8100 |
Definition at line 114 of file Ethernet.h.
| typedef struct stru_eth_bpdu ETH_BPDU |
| typedef struct stru_eth_packet ETH_HDR |
| typedef struct stru_eth_interface_var ETH_IF |
| typedef struct stru_ethernet_lan ETH_LAN |
Definition at line 73 of file Ethernet.h.
| typedef enum enum_eth_packet ETH_PACKET |
| typedef struct stru_eth_phy ETH_PHY |
| typedef struct stru_ethernet_spt ETH_SPT |
| typedef struct stru_ethernet_var ETH_VAR |
| typedef struct ieee802_1q_tag IEEE801_1Q_TAG |
| typedef struct stru_eth_bpdu * ptrETH_BPDU |
| typedef struct stru_eth_packet* ptrETH_HDR |
| typedef struct stru_eth_interface_var * ptrETH_IF |
| typedef struct stru_ethernet_lan * ptrETH_LAN |
Definition at line 73 of file Ethernet.h.
| typedef struct stru_eth_phy * ptrETH_PHY |
| typedef struct stru_ethernet_spt * ptrETH_SPT |
| typedef struct stru_ethernet_var* ptrETH_VAR |
| typedef struct ieee802_1q_tag * ptrIEEE801_1Q_TAG |
| typedef struct stru_SwitchTable * ptrSWITCHTABLE |
| typedef enum enum_PortState SWITCH_PORTSTATE |
Enumeration for SWITCH Port state
| typedef enum enum_port_type SWITCH_PORTTYPE |
| typedef enum enum_SwitchingTechnique SWITCHING_TECHNIQUE |
Enumeration for Switching Technique
| typedef struct stru_SwitchTable SWITCHTABLE |
| enum enum_eth_packet |
| Enumerator | |
|---|---|
| ETH_CONFIGBPDU | |
Definition at line 40 of file Ethernet.h.
| enum enum_port_type |
| Enumerator | |
|---|---|
| PORTTYPE_DESIGNATED | |
| PORTTYPE_NONDESIGNATED | |
| PORTTYPE_ROOT | |
Definition at line 64 of file Ethernet.h.
| enum enum_PortState |
Enumeration for SWITCH Port state
| Enumerator | |
|---|---|
| PORTSTATE_DISABLED | |
| PORTSTATE_LISTENING | |
| PORTSTATE_LEARNING | |
| PORTSTATE_FORWARDING | |
| PORTSTATE_BLOCKING | |
Definition at line 55 of file Ethernet.h.
Enumeration for Switching Technique
| Enumerator | |
|---|---|
| SWITCHINGTECHNIQUE_NULL | |
| SWITCHINGTECHNIQUE_STORE_FORWARD | |
| SWITCHINGTECHNIQUE_CUT_THROUGH | |
| SWITCHINGTECHNIQUE_FRAGMENT_FREE | |
Definition at line 46 of file Ethernet.h.
| enum VLANPORT |
| Enumerator | |
|---|---|
| VLANPORT_NONE | |
| VLANPORT_ACCESS | |
| VLANPORT_TRUNK | |
Definition at line 133 of file Ethernet.h.
| void check_move_frame_up | ( | NETSIM_ID | d, |
| NETSIM_ID | in, | ||
| ptrETH_LAN | lan, | ||
| NetSim_PACKET * | packet, | ||
| double | time | ||
| ) |
Definition at line 187 of file Ethernet_Mac.c.


| void clear_eth_incoming | ( | NetSim_PACKET * | packet | ) |

| NETSIM_ID eth_get_incoming_port | ( | NetSim_PACKET * | packet, |
| NETSIM_ID | devId | ||
| ) |

| UINT16 eth_get_incoming_vlanid | ( | NetSim_PACKET * | packet, |
| NETSIM_ID | devId | ||
| ) |

| NETSIM_ID find_forward_interface | ( | ptrETH_LAN | lan, |
| NetSim_PACKET * | packet | ||
| ) |
Definition at line 31 of file Ethernet_Mac.c.


| void forward_frame | ( | NETSIM_ID | d, |
| NETSIM_ID | in, | ||
| ptrETH_LAN | lan, | ||
| NetSim_PACKET * | packet, | ||
| double | time | ||
| ) |
Definition at line 252 of file Ethernet_Mac.c.


| void free_eth_hdr | ( | NetSim_PACKET * | packet | ) |

| void FREE_ETH_VAR | ( | NETSIM_ID | d | ) |
| void * get_eth_hdr_var | ( | NetSim_PACKET * | packet | ) |

| ptrETH_IF GET_ETH_IF | ( | ptrETH_LAN | lan, |
| NETSIM_ID | i | ||
| ) |

| ptrETH_LAN GET_ETH_LAN | ( | NETSIM_ID | d, |
| NETSIM_ID | i, | ||
| UINT16 | vlanId | ||
| ) |

| ptrETH_VAR GET_ETH_VAR | ( | NETSIM_ID | d | ) |

| void init_spanning_tree_protocol | ( | ) |
| bool isVLANTagPresent | ( | NetSim_PACKET * | packet | ) |
| int multicast_config_bpdu | ( | ) |
Definition at line 301 of file SpanningTree.c.


| void print_ethernet_log | ( | char * | format, |
| ... | |||
| ) |

| void print_spanning_tree | ( | ) |
| void process_configbpdu | ( | ) |
Definition at line 484 of file SpanningTree.c.


| void send_to_phy | ( | NETSIM_ID | d, |
| NETSIM_ID | in, | ||
| NetSim_PACKET * | packet, | ||
| double | time | ||
| ) |
Definition at line 41 of file Ethernet_Mac.c.
| void set_eth_hdr | ( | NetSim_PACKET * | packet, |
| UINT | type, | ||
| void * | var, | ||
| void * | fncopy)(void *, | ||
| void(*)(void *) | fnfree | ||
| ) |

| void SET_ETH_VAR | ( | NETSIM_ID | d, |
| ptrETH_VAR | var | ||
| ) |
| void store_eth_incoming | ( | NetSim_PACKET * | packet, |
| NETSIM_ID | devId, | ||
| NETSIM_ID | incomingPort, | ||
| UINT16 | vlanId | ||
| ) |
| void store_eth_param_macin | ( | NetSim_PACKET * | packet, |
| NETSIM_ID | devId, | ||
| NETSIM_ID | in, | ||
| ptrETH_LAN | lan | ||
| ) |

| ptrSWITCHTABLE SWITCHTABLE_FIND | ( | ptrETH_LAN | lan, |
| PNETSIM_MACADDRESS | dest | ||
| ) |
Definition at line 18 of file SwitchTable.c.


| void switchtable_metrics_print | ( | PMETRICSWRITER | metricsWriter | ) |
| void SWITCHTABLE_NEW | ( | ptrETH_LAN | lan, |
| PNETSIM_MACADDRESS | dest, | ||
| NETSIM_ID | outport | ||
| ) |
Definition at line 30 of file SwitchTable.c.


| void vlan_add_trunk_port | ( | ptrETH_VAR | eth, |
| NETSIM_ID | in | ||
| ) |
| void vlan_forward_to_all_trunk | ( | NETSIM_ID | d, |
| NetSim_PACKET * | packet, | ||
| ptrETH_LAN | lan, | ||
| double | time | ||
| ) |
| void vlan_macin_forward_packet | ( | ) |
| void vlan_macout_forward_packet | ( | NETSIM_ID | d, |
| NETSIM_ID | in, | ||
| UINT16 | vlanId, | ||
| NETSIM_ID | incoming, | ||
| NetSim_PACKET * | packet, | ||
| double | time | ||
| ) |
| PNETSIM_MACADDRESS multicastSPTMAC |
Definition at line 36 of file Ethernet.h.