Subversion Repositories HelenOS

Rev

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

Rev 4350 Rev 4351
Line 64... Line 64...
64
            case SERVICE_ARP:
64
            case SERVICE_ARP:
65
                return arp_message( callid, call, answer, answer_count );
65
                return arp_message( callid, call, answer, answer_count );
66
            default:
66
            default:
67
                return EINVAL;
67
                return EINVAL;
68
        }
68
        }
69
    }else if( IS_NET_IP_MESSAGE( call )){
69
    }else if( IS_NET_IP_MESSAGE( call ) || IS_NET_NIL_MESSAGE( call )){
70
        return ip_message( callid, call, answer, answer_count );
70
        return ip_message( callid, call, answer, answer_count );
71
    }else if( IS_NET_ARP_MESSAGE( call )){
71
    }else if( IS_NET_ARP_MESSAGE( call )){
72
        return arp_message( callid, call, answer, answer_count );
72
        return arp_message( callid, call, answer, answer_count );
73
/*  }else if( IS_NET_RARP_MESSAGE( call )){
73
/*  }else if( IS_NET_RARP_MESSAGE( call )){
74
        return rarp_message( callid, call, answer, answer_count );
74
        return rarp_message( callid, call, answer, answer_count );
Line 87... Line 87...
87
            return net_message( callid, call, answer, answer_count );
87
            return net_message( callid, call, answer, answer_count );
88
        }
88
        }
89
    }
89
    }
90
}
90
}
91
 
91
 
92
int net_initialize( void ){
92
int net_initialize( async_client_conn_t client_connection ){
93
    ERROR_DECLARE;
93
    ERROR_DECLARE;
94
 
94
 
95
    ipcarg_t    phonehash;
95
    ipcarg_t    phonehash;
96
 
96
 
97
    netifs_initialize( & net_globals.netifs );
97
    netifs_initialize( & net_globals.netifs );
Line 105... Line 105...
105
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, LO_NAME, LO_FILENAME, SERVICE_LO, 0, connect_to_service ));
105
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, LO_NAME, LO_FILENAME, SERVICE_LO, 0, connect_to_service ));
106
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, DP8390_NAME, DP8390_FILENAME, SERVICE_DP8390, 0, connect_to_service ));
106
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, DP8390_NAME, DP8390_FILENAME, SERVICE_DP8390, 0, connect_to_service ));
107
 
107
 
108
    ERROR_PROPAGATE( REGISTER_ME( SERVICE_IP, & phonehash ));
108
    ERROR_PROPAGATE( REGISTER_ME( SERVICE_IP, & phonehash ));
109
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, IP_NAME, IP_FILENAME, SERVICE_IP, task_get_id(), ip_connect_module ));
109
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, IP_NAME, IP_FILENAME, SERVICE_IP, task_get_id(), ip_connect_module ));
110
    ERROR_PROPAGATE( ip_initialize());
110
    ERROR_PROPAGATE( ip_initialize( client_connection ));
111
    ERROR_PROPAGATE( REGISTER_ME( SERVICE_ARP, & phonehash ));
111
    ERROR_PROPAGATE( REGISTER_ME( SERVICE_ARP, & phonehash ));
112
    ERROR_PROPAGATE( arp_initialize());
112
    ERROR_PROPAGATE( arp_initialize( client_connection ));
113
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_RARP, & phonehash ));
113
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_RARP, & phonehash ));
114
//  ERROR_PROPAGATE( rarp_initialize());
114
//  ERROR_PROPAGATE( rarp_initialize( client_connection ));
115
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_ICMP, & phonehash ));
115
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_ICMP, & phonehash ));
116
//  ERROR_PROPAGATE( icmp_initialize());
116
//  ERROR_PROPAGATE( icmp_initialize( client_connection ));
117
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_UDP, & phonehash ));
117
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_UDP, & phonehash ));
118
//  ERROR_PROPAGATE( udp_initialize());
118
//  ERROR_PROPAGATE( udp_initialize( client_connection ));
119
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_TCP, & phonehash ));
119
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_TCP, & phonehash ));
120
//  ERROR_PROPAGATE( tcp_initialize());
120
//  ERROR_PROPAGATE( tcp_initialize( client_connection ));
121
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_SOCKET, & phonehash ));
121
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_SOCKET, & phonehash ));
122
//  ERROR_PROPAGATE( socket_initialize());
122
//  ERROR_PROPAGATE( socket_initialize( client_connection ));
123
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_ETHERNET, & phonehash ));
123
//  ERROR_PROPAGATE( REGISTER_ME( SERVICE_ETHERNET, & phonehash ));
124
//  ERROR_PROPAGATE( ethernet_initialize());
124
//  ERROR_PROPAGATE( ethernet_initialize( client_connection ));
125
    return EOK;
125
    return EOK;
126
}
126
}
127
 
127
 
128
int read_netif_configuration( char * name, netif_ref netif ){
128
int read_netif_configuration( char * name, netif_ref netif ){
129
    ERROR_DECLARE;
129
    ERROR_DECLARE;