Subversion Repositories HelenOS

Rev

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

Rev 4722 Rev 4743
Line 85... Line 85...
85
 *  @param mtu The device maximum transmission unit. Input parameter.
85
 *  @param mtu The device maximum transmission unit. Input parameter.
86
 *  @returns EOK on success.
86
 *  @returns EOK on success.
87
 *  @returns EEXIST if the device with the different service exists.
87
 *  @returns EEXIST if the device with the different service exists.
88
 *  @returns ENOMEM if there is not enough memory left.
88
 *  @returns ENOMEM if there is not enough memory left.
89
 *  @returns Other error codes as defined for the netif_bind_service() function.
89
 *  @returns Other error codes as defined for the netif_bind_service() function.
90
 *  @returns Other error codes as defined for the netif_get_addr() function.
90
 *  @returns Other error codes as defined for the netif_get_addr_req() function.
91
 */
91
 */
92
int nildummy_device_message( device_id_t device_id, services_t service, size_t mtu );
92
int nildummy_device_message( device_id_t device_id, services_t service, size_t mtu );
93
 
93
 
94
/** Returns the device packet dimensions for sending.
94
/** Returns the device packet dimensions for sending.
95
 *  @param device_id The device identifier. Input parameter.
95
 *  @param device_id The device identifier. Input parameter.
Line 206... Line 206...
206
            fibril_rwlock_write_unlock( & nildummy_globals.devices_lock );
206
            fibril_rwlock_write_unlock( & nildummy_globals.devices_lock );
207
            free( device );
207
            free( device );
208
            return device->phone;
208
            return device->phone;
209
        }
209
        }
210
        // get hardware address
210
        // get hardware address
211
        if( ERROR_OCCURRED( netif_get_addr( device->phone, device->device_id, & device->addr, & device->addr_data ))){
211
        if( ERROR_OCCURRED( netif_get_addr_req( device->phone, device->device_id, & device->addr, & device->addr_data ))){
212
            fibril_rwlock_write_unlock( & nildummy_globals.devices_lock );
212
            fibril_rwlock_write_unlock( & nildummy_globals.devices_lock );
213
            free( device );
213
            free( device );
214
            return ERROR_CODE;
214
            return ERROR_CODE;
215
        }
215
        }
216
        // add to the cache
216
        // add to the cache