Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/il/arp/arp.h

    re9caf47 rffa2c8ef  
    3939
    4040#include <fibril_synch.h>
    41 
    42 #include <ipc/ipc.h>
    4341#include <ipc/services.h>
    44 
    4542#include <net/device.h>
    4643#include <net/packet.h>
     
    5552typedef struct arp_device arp_device_t;
    5653
    57 /** Type definition of the ARP device specific data pointer.
    58  * @see arp_device
    59  */
    60 typedef arp_device_t *arp_device_ref;
    61 
    6254/** Type definition of the ARP global data.
    6355 * @see arp_globals
     
    7062typedef struct arp_proto arp_proto_t;
    7163
    72 /** Type definition of the ARP protocol specific data pointer.
    73  * @see arp_proto
     64/** Type definition of the ARP address translation record.
     65 * @see arp_trans
    7466 */
    75 typedef arp_proto_t *arp_proto_ref;
     67typedef struct arp_trans arp_trans_t;
    7668
    7769/** ARP address map.
     
    8072 * @see generic_char_map.h
    8173 */
    82 GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t);
     74GENERIC_CHAR_MAP_DECLARE(arp_addr, arp_trans_t);
    8375
    8476/** ARP address cache.
     
    9991struct arp_device {
    10092        /** Actual device hardware address. */
    101         measured_string_ref addr;
     93        measured_string_t *addr;
    10294        /** Actual device hardware address data. */
    103         char *addr_data;
     95        uint8_t *addr_data;
    10496        /** Broadcast device hardware address. */
    105         measured_string_ref broadcast_addr;
     97        measured_string_t *broadcast_addr;
    10698        /** Broadcast device hardware address data. */
    107         char *broadcast_data;
     99        uint8_t *broadcast_data;
    108100        /** Device identifier. */
    109101        device_id_t device_id;
     
    130122        arp_cache_t cache;
    131123       
    132         /**
    133          * The client connection processing function.
    134          * The module skeleton propagates its own one.
    135          */
    136         async_client_conn_t client_connection;
    137        
    138124        /** Networking module phone. */
    139125        int net_phone;
    140126        /** Safety lock. */
    141         fibril_rwlock_t lock;
     127        fibril_mutex_t lock;
    142128};
    143129
     
    145131struct arp_proto {
    146132        /** Actual device protocol address. */
    147         measured_string_ref addr;
     133        measured_string_t *addr;
    148134        /** Actual device protocol address data. */
    149         char *addr_data;
     135        uint8_t *addr_data;
    150136        /** Address map. */
    151137        arp_addr_t addresses;
     
    154140};
    155141
     142/** ARP address translation record. */
     143struct arp_trans {
     144        /**
     145         * Hardware address for the translation. NULL denotes an incomplete
     146         * record with possible waiters.
     147         */
     148        measured_string_t *hw_addr;
     149        /** Condition variable used for waiting for completion of the record. */
     150        fibril_condvar_t cv;
     151};
     152
    156153#endif
    157154
    158155/** @}
    159156 */
     157
Note: See TracChangeset for help on using the changeset viewer.