Ignore:
File:
1 edited

Legend:

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

    r4eca056 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>
     
    6562typedef struct arp_proto arp_proto_t;
    6663
     64/** Type definition of the ARP address translation record.
     65 * @see arp_trans
     66 */
     67typedef struct arp_trans arp_trans_t;
     68
    6769/** ARP address map.
    6870 *
     
    7072 * @see generic_char_map.h
    7173 */
    72 GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t);
     74GENERIC_CHAR_MAP_DECLARE(arp_addr, arp_trans_t);
    7375
    7476/** ARP address cache.
     
    8991struct arp_device {
    9092        /** Actual device hardware address. */
    91         measured_string_t * addr;
     93        measured_string_t *addr;
    9294        /** Actual device hardware address data. */
    93         char *addr_data;
     95        uint8_t *addr_data;
    9496        /** Broadcast device hardware address. */
    95         measured_string_t * broadcast_addr;
     97        measured_string_t *broadcast_addr;
    9698        /** Broadcast device hardware address data. */
    97         char *broadcast_data;
     99        uint8_t *broadcast_data;
    98100        /** Device identifier. */
    99101        device_id_t device_id;
     
    120122        arp_cache_t cache;
    121123       
    122         /**
    123          * The client connection processing function.
    124          * The module skeleton propagates its own one.
    125          */
    126         async_client_conn_t client_connection;
    127        
    128124        /** Networking module phone. */
    129125        int net_phone;
    130126        /** Safety lock. */
    131         fibril_rwlock_t lock;
     127        fibril_mutex_t lock;
    132128};
    133129
     
    137133        measured_string_t *addr;
    138134        /** Actual device protocol address data. */
    139         char *addr_data;
     135        uint8_t *addr_data;
    140136        /** Address map. */
    141137        arp_addr_t addresses;
     
    144140};
    145141
     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
    146153#endif
    147154
    148155/** @}
    149156 */
     157
Note: See TracChangeset for help on using the changeset viewer.