Ignore:
File:
1 edited

Legend:

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

    rffa2c8ef re9caf47  
    3939
    4040#include <fibril_synch.h>
     41
     42#include <ipc/ipc.h>
    4143#include <ipc/services.h>
     44
    4245#include <net/device.h>
    4346#include <net/packet.h>
     
    5255typedef struct arp_device arp_device_t;
    5356
     57/** Type definition of the ARP device specific data pointer.
     58 * @see arp_device
     59 */
     60typedef arp_device_t *arp_device_ref;
     61
    5462/** Type definition of the ARP global data.
    5563 * @see arp_globals
     
    6270typedef struct arp_proto arp_proto_t;
    6371
    64 /** Type definition of the ARP address translation record.
    65  * @see arp_trans
     72/** Type definition of the ARP protocol specific data pointer.
     73 * @see arp_proto
    6674 */
    67 typedef struct arp_trans arp_trans_t;
     75typedef arp_proto_t *arp_proto_ref;
    6876
    6977/** ARP address map.
     
    7280 * @see generic_char_map.h
    7381 */
    74 GENERIC_CHAR_MAP_DECLARE(arp_addr, arp_trans_t);
     82GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t);
    7583
    7684/** ARP address cache.
     
    9199struct arp_device {
    92100        /** Actual device hardware address. */
    93         measured_string_t *addr;
     101        measured_string_ref addr;
    94102        /** Actual device hardware address data. */
    95         uint8_t *addr_data;
     103        char *addr_data;
    96104        /** Broadcast device hardware address. */
    97         measured_string_t *broadcast_addr;
     105        measured_string_ref broadcast_addr;
    98106        /** Broadcast device hardware address data. */
    99         uint8_t *broadcast_data;
     107        char *broadcast_data;
    100108        /** Device identifier. */
    101109        device_id_t device_id;
     
    122130        arp_cache_t cache;
    123131       
     132        /**
     133         * The client connection processing function.
     134         * The module skeleton propagates its own one.
     135         */
     136        async_client_conn_t client_connection;
     137       
    124138        /** Networking module phone. */
    125139        int net_phone;
    126140        /** Safety lock. */
    127         fibril_mutex_t lock;
     141        fibril_rwlock_t lock;
    128142};
    129143
     
    131145struct arp_proto {
    132146        /** Actual device protocol address. */
    133         measured_string_t *addr;
     147        measured_string_ref addr;
    134148        /** Actual device protocol address data. */
    135         uint8_t *addr_data;
     149        char *addr_data;
    136150        /** Address map. */
    137151        arp_addr_t addresses;
     
    140154};
    141155
    142 /** ARP address translation record. */
    143 struct 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 
    153156#endif
    154157
    155158/** @}
    156159 */
    157 
Note: See TracChangeset for help on using the changeset viewer.