Rev 4396 | Rev 4558 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4396 | Rev 4501 | ||
---|---|---|---|
Line 70... | Line 70... | ||
70 | 70 | ||
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 | /** Clears the whole cache. |
- | |
76 | * @returns EOK on success. |
- | |
77 | */ |
- | |
78 | int arp_clean_cache_req( int arp_phone ); |
- | |
79 | - | ||
80 | /** Clears the device specific data from the cache. |
- | |
81 | * @param arp_phone The ARP module phone used for (semi)remote calls. Input parameter. |
- | |
82 | * @param device_id The device identifier. Input parameter. |
- | |
83 | * @returns EOK on success. |
- | |
84 | * @returns ENOENT if the device is not found in the cache. |
- | |
85 | */ |
- | |
86 | int arp_clear_device_req( int arp_phone, device_id_t device_id ); |
- | |
87 | - | ||
88 | /** Creates new protocol specific data. |
75 | /** Creates new protocol specific data. |
89 | * @param proto Protocol specific data. Output parameter. |
76 | * @param proto Protocol specific data. Output parameter. |
90 | * @param service Protocol module service. Input parameter. |
77 | * @param service Protocol module service. Input parameter. |
91 | * @param address Actual protocol device address. Input parameter. |
78 | * @param address Actual protocol device address. Input parameter. |
92 | * @returns EOK on success. |
79 | * @returns EOK on success. |
Line 144... | Line 131... | ||
144 | 131 | ||
145 | INT_MAP_IMPLEMENT( arp_protos, arp_proto_t ) |
132 | INT_MAP_IMPLEMENT( arp_protos, arp_proto_t ) |
146 | 133 | ||
147 | GENERIC_CHAR_MAP_IMPLEMENT( arp_addr, measured_string_t ) |
134 | GENERIC_CHAR_MAP_IMPLEMENT( arp_addr, measured_string_t ) |
148 | 135 | ||
149 | int arp_task_get_id( void ){ |
136 | task_id_t arp_task_get_id( void ){ |
150 | return task_get_id(); |
137 | return task_get_id(); |
151 | } |
138 | } |
152 | 139 | ||
153 | int arp_clear_device_req( int arp_phone, device_id_t device_id ){ |
140 | int arp_clear_device_req( int arp_phone, device_id_t device_id ){ |
154 | arp_device_ref device; |
141 | arp_device_ref device; |
Line 519... | Line 506... | ||
519 | return EOK; |
506 | return EOK; |
520 | case NET_IL_RECEIVED: |
507 | case NET_IL_RECEIVED: |
521 | if( ! ERROR_OCCURRED( packet_translate( arp_globals.net_phone, & packet, IPC_GET_PACKET( call )))){ |
508 | if( ! ERROR_OCCURRED( packet_translate( arp_globals.net_phone, & packet, IPC_GET_PACKET( call )))){ |
522 | rwlock_read_lock( & arp_globals.lock ); |
509 | rwlock_read_lock( & arp_globals.lock ); |
523 | do{ |
510 | do{ |
524 | next = pq_next( packet ); |
511 | next = pq_detach( packet ); |
525 | pq_detach( packet ); |
- | |
526 | ERROR_CODE = arp_receive_message( IPC_GET_DEVICE( call ), packet ); |
512 | ERROR_CODE = arp_receive_message( IPC_GET_DEVICE( call ), packet ); |
527 | if( ERROR_CODE != 1 ) pq_release( arp_globals.net_phone, packet_get_id( packet )); |
513 | if( ERROR_CODE != 1 ) pq_release( arp_globals.net_phone, packet_get_id( packet )); |
528 | packet = next; |
514 | packet = next; |
529 | }while( packet ); |
515 | }while( packet ); |
530 | rwlock_read_unlock( & arp_globals.lock ); |
516 | rwlock_read_unlock( & arp_globals.lock ); |