Subversion Repositories HelenOS

Rev

Rev 4351 | Rev 4708 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4351 Rev 4558
Line 47... Line 47...
47
 *  @param nil Network interface layer service. Input parameter.
47
 *  @param nil Network interface layer service. Input parameter.
48
 *  @param il Internetwork layer service. Input parameter.
48
 *  @param il Internetwork layer service. Input parameter.
49
 *  @returns Network interface layer type of the internetworking layer service.
49
 *  @returns Network interface layer type of the internetworking layer service.
50
 *  @returns 0 if mapping is not found.
50
 *  @returns 0 if mapping is not found.
51
 */
51
 */
52
static inline int protocol_map( services_t nil, services_t il ){
52
static inline eth_type_t protocol_map( services_t nil, services_t il ){
53
    switch( nil ){
53
    switch( nil ){
54
        case SERVICE_ETHERNET:
54
        case SERVICE_ETHERNET:
55
        case SERVICE_DP8390:
55
        case SERVICE_DP8390:
56
            switch( il ){
56
            switch( il ){
57
                case SERVICE_IP:
57
                case SERVICE_IP:
Line 92... Line 92...
92
/** Maps the link service access point identifier to the Ethernet protocol identifier.
92
/** Maps the link service access point identifier to the Ethernet protocol identifier.
93
 *  @param lsap Link service access point identifier. Input parameter.
93
 *  @param lsap Link service access point identifier. Input parameter.
94
 *  @returns Ethernet protocol identifier of the link service access point identifier.
94
 *  @returns Ethernet protocol identifier of the link service access point identifier.
95
 *  @returns ETH_LSAP_NULL if mapping is not found.
95
 *  @returns ETH_LSAP_NULL if mapping is not found.
96
 */
96
 */
97
static inline int lsap_map( int lsap ){
97
static inline int lsap_map( eth_lsap_t lsap ){
98
    switch( lsap ){
98
    switch( lsap ){
99
        case ETH_LSAP_IP:
99
        case ETH_LSAP_IP:
100
            return ETH_P_IP;
100
            return ETH_P_IP;
101
        case ETH_LSAP_ARP:
101
        case ETH_LSAP_ARP:
102
            return ETH_P_ARP;
102
            return ETH_P_ARP;
Line 108... Line 108...
108
/** Maps the network interface layer services to the hardware types.
108
/** Maps the network interface layer services to the hardware types.
109
 *  @param nil The network interface service. Input parameter.
109
 *  @param nil The network interface service. Input parameter.
110
 *  @returns The hardware type of the network interface service.
110
 *  @returns The hardware type of the network interface service.
111
 *  @returns 0 if mapping is not found.
111
 *  @returns 0 if mapping is not found.
112
 */
112
 */
113
static inline int hardware_map( services_t nil ){
113
static inline hw_type_t hardware_map( services_t nil ){
114
    switch( nil ){
114
    switch( nil ){
115
        case SERVICE_ETHERNET:
115
        case SERVICE_ETHERNET:
116
        case SERVICE_DP8390:
116
        case SERVICE_DP8390:
117
            return HW_ETHER;
117
            return HW_ETHER;
118
        default:
118
        default: