Rev 3912 | Rev 4243 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3912 | Rev 4075 | ||
|---|---|---|---|
| Line 37... | Line 37... | ||
| 37 | #ifndef __NET_PROTOCOL_MAP_H__ |
37 | #ifndef __NET_PROTOCOL_MAP_H__ |
| 38 | #define __NET_PROTOCOL_MAP_H__ |
38 | #define __NET_PROTOCOL_MAP_H__ |
| 39 | 39 | ||
| 40 | #include <ipc/services.h> |
40 | #include <ipc/services.h> |
| 41 | 41 | ||
| - | 42 | #include "ethernet_lsap.h" |
|
| 42 | #include "ethernet_protocols.h" |
43 | #include "ethernet_protocols.h" |
| 43 | 44 | ||
| 44 | /** Maps the internetwork layer service to the network interface layer type. |
45 | /** Maps the internetwork layer service to the network interface layer type. |
| 45 | * @param nil Network interface layer service. Input parameter. |
46 | * @param nil Network interface layer service. Input parameter. |
| 46 | * @param il Internetwork layer service. Input parameter. |
47 | * @param il Internetwork layer service. Input parameter. |
| Line 83... | Line 84... | ||
| 83 | default: |
84 | default: |
| 84 | return 0; |
85 | return 0; |
| 85 | } |
86 | } |
| 86 | } |
87 | } |
| 87 | 88 | ||
| - | 89 | /** Maps the link service access point identifier to the Ethernet protocol identifier. |
|
| - | 90 | * @param lsap Link service access point identifier. Input parameter. |
|
| - | 91 | * @returns Ethernet protocol identifier of the link service access point identifier. |
|
| - | 92 | * @returns ETH_LSAP_NULL if mapping is not found. |
|
| - | 93 | */ |
|
| - | 94 | static inline int lsap_map( int lsap ){ |
|
| - | 95 | switch( lsap ){ |
|
| - | 96 | case ETH_LSAP_IP: |
|
| - | 97 | return ETH_P_IP; |
|
| - | 98 | case ETH_LSAP_ARP: |
|
| - | 99 | return ETH_P_ARP; |
|
| - | 100 | default: |
|
| - | 101 | return ETH_LSAP_NULL; |
|
| - | 102 | } |
|
| - | 103 | } |
|
| - | 104 | ||
| 88 | #endif |
105 | #endif |
| 89 | 106 | ||
| 90 | /** @} |
107 | /** @} |
| 91 | */ |
108 | */ |