Subversion Repositories HelenOS

Rev

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

Rev 4708 Rev 4723
Line 71... Line 71...
71
/** ARP global data.
71
/** ARP global data.
72
 */
72
 */
73
arp_globals_t   arp_globals;
73
arp_globals_t   arp_globals;
74
 
74
 
75
/** Creates new protocol specific data.
75
/** Creates new protocol specific data.
-
 
76
 *  Allocates and returns the needed memory block as the proto parameter.
76
 *  @param proto Protocol specific data. Output parameter.
77
 *  @param proto The allocated protocol specific data. Output parameter.
77
 *  @param service Protocol module service. Input parameter.
78
 *  @param service The protocol module service. Input parameter.
78
 *  @param address Actual protocol device address. Input parameter.
79
 *  @param address The actual protocol device address. Input parameter.
79
 *  @returns EOK on success.
80
 *  @returns EOK on success.
80
 *  @returns ENOMEM if there is not enough memory left.
81
 *  @returns ENOMEM if there is not enough memory left.
81
 */
82
 */
82
int arp_proto_create( arp_proto_ref * proto, services_t service, measured_string_ref address );
83
int arp_proto_create( arp_proto_ref * proto, services_t service, measured_string_ref address );
83
 
84
 
Line 208... Line 209...
208
int arp_device_req( int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address ){
209
int arp_device_req( int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address ){
209
    ERROR_DECLARE;
210
    ERROR_DECLARE;
210
 
211
 
211
    measured_string_ref tmp;
212
    measured_string_ref tmp;
212
 
213
 
-
 
214
    // copy the given address for exclusive use
213
    tmp = measured_string_copy( address );
215
    tmp = measured_string_copy( address );
214
    if( ERROR_OCCURRED( arp_device_message( device_id, netif, protocol, tmp ))){
216
    if( ERROR_OCCURRED( arp_device_message( device_id, netif, protocol, tmp ))){
215
        free( tmp->value );
217
        free( tmp->value );
216
        free( tmp );
218
        free( tmp );
217
    }
219
    }