Subversion Repositories HelenOS

Rev

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

Rev 4351 Rev 4498
Line 50... Line 50...
50
 
50
 
51
#include "../../include/device.h"
51
#include "../../include/device.h"
52
#include "../../include/nil_interface.h"
52
#include "../../include/nil_interface.h"
53
#include "../../include/net_interface.h"
53
#include "../../include/net_interface.h"
54
 
54
 
-
 
55
#include "../../nil/nil_messages.h"
-
 
56
 
55
#include "../netif.h"
57
#include "../netif.h"
56
#include "../netif_module.h"
58
#include "../netif_module.h"
57
 
59
 
58
/** Default maximum transmission unit.
60
/** Default maximum transmission unit.
59
 */
61
 */
Line 102... Line 104...
102
 *  @see NAME
104
 *  @see NAME
103
 */
105
 */
104
void    module_print_name( void );
106
void    module_print_name( void );
105
 
107
 
106
int netif_specific_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ){
108
int netif_specific_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ){
-
 
109
    switch( IPC_GET_METHOD( * call )){
-
 
110
        case NET_NIL_PACKET_SPACE:
-
 
111
            * IPC_SET_ADDR( answer ) = 0;
-
 
112
            * IPC_SET_PREFIX( answer ) = 0;
-
 
113
            * IPC_SET_CONTENT( answer ) = lo_globals.mtu;
-
 
114
            * IPC_SET_SUFFIX( answer ) = 0;
-
 
115
            * answer_count = 4;
-
 
116
            return EOK;
-
 
117
        default:
107
    return ENOTSUP;
118
            return ENOTSUP;
-
 
119
    }
108
}
120
}
109
 
121
 
110
int netif_get_addr_message( device_id_t device_id, measured_string_ref address ){
122
int netif_get_addr_message( device_id_t device_id, measured_string_ref address ){
111
    if( ! address ) return EBADMEM;
123
    if( ! address ) return EBADMEM;
112
    address->value = DEFAULT_ADDR;
124
    address->value = DEFAULT_ADDR;
Line 186... Line 198...
186
    ERROR_DECLARE;
198
    ERROR_DECLARE;
187
 
199
 
188
    device_ref          device;
200
    device_ref          device;
189
    measured_string_t   names[ 1 ] = {{ "MTU", 3 }};
201
    measured_string_t   names[ 1 ] = {{ "MTU", 3 }};
190
    measured_string_ref configuration;
202
    measured_string_ref configuration;
191
    int                 count = 1;
203
    size_t              count = sizeof( names ) / sizeof( measured_string_t );
192
    char *              data;
204
    char *              data;
193
 
205
 
194
    configuration = & names[ 0 ];
206
    configuration = & names[ 0 ];
195
    // create a new device
207
    // create a new device
196
    ERROR_PROPAGATE( create( device_id, & device ));
208
    ERROR_PROPAGATE( create( device_id, & device ));