Ignore:
File:
1 edited

Legend:

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

    r4eca056 re526f08  
    2828
    2929/** @addtogroup arp
    30  * @{
     30 *  @{
    3131 */
    3232
    3333/** @file
    34  * ARP module.
     34 *  ARP module.
    3535 */
    3636
    37 #ifndef NET_ARP_H_
    38 #define NET_ARP_H_
     37#ifndef __NET_ARP_H__
     38#define __NET_ARP_H__
    3939
    4040#include <fibril_synch.h>
     
    4444
    4545#include <net/device.h>
    46 #include <net/packet.h>
    4746#include <net_hardware.h>
    4847#include <adt/generic_char_map.h>
     
    5049#include <adt/measured_strings.h>
    5150
     51
    5252/** Type definition of the ARP device specific data.
    53  * @see arp_device
     53 *  @see arp_device
    5454 */
    55 typedef struct arp_device arp_device_t;
     55typedef struct arp_device       arp_device_t;
     56
     57/** Type definition of the ARP device specific data pointer.
     58 *  @see arp_device
     59 */
     60typedef arp_device_t *          arp_device_ref;
    5661
    5762/** Type definition of the ARP global data.
    58  * @see arp_globals
     63 *  @see arp_globals
    5964 */
    60 typedef struct arp_globals arp_globals_t;
     65typedef struct arp_globals      arp_globals_t;
    6166
    6267/** Type definition of the ARP protocol specific data.
    63  * @see arp_proto
     68 *  @see arp_proto
    6469 */
    65 typedef struct arp_proto arp_proto_t;
     70typedef struct arp_proto        arp_proto_t;
     71
     72/** Type definition of the ARP protocol specific data pointer.
     73 *  @see arp_proto
     74 */
     75typedef arp_proto_t *           arp_proto_ref;
    6676
    6777/** ARP address map.
    68  *
    69  * Translates addresses.
    70  * @see generic_char_map.h
     78 *  Translates addresses.
     79 *  @see generic_char_map.h
    7180 */
    72 GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t);
     81GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t)
    7382
    7483/** ARP address cache.
    75  *
    76  * Maps devices to the ARP device specific data.
    77  * @see device.h
     84 *  Maps devices to the ARP device specific data.
     85 *  @see device.h
    7886 */
    79 DEVICE_MAP_DECLARE(arp_cache, arp_device_t);
     87DEVICE_MAP_DECLARE(arp_cache, arp_device_t)
    8088
    8189/** ARP protocol map.
    82  *
    83  * Maps protocol identifiers to the ARP protocol specific data.
    84  * @see int_map.h
     90 *  Maps protocol identifiers to the ARP protocol specific data.
     91 *  @see int_map.h
    8592 */
    86 INT_MAP_DECLARE(arp_protos, arp_proto_t);
     93INT_MAP_DECLARE(arp_protos, arp_proto_t)
    8794
    88 /** ARP device specific data. */
    89 struct arp_device {
    90         /** Actual device hardware address. */
    91         measured_string_t * addr;
    92         /** Actual device hardware address data. */
    93         char *addr_data;
    94         /** Broadcast device hardware address. */
    95         measured_string_t * broadcast_addr;
    96         /** Broadcast device hardware address data. */
    97         char *broadcast_data;
    98         /** Device identifier. */
     95/** ARP device specific data.
     96 */
     97struct arp_device{
     98        /** Actual device hardware address.
     99         */
     100        measured_string_ref addr;
     101        /** Actual device hardware address data.
     102         */
     103        char * addr_data;
     104        /** Broadcast device hardware address.
     105         */
     106        measured_string_ref broadcast_addr;
     107        /** Broadcast device hardware address data.
     108         */
     109        char * broadcast_data;
     110        /** Device identifier.
     111         */
    99112        device_id_t device_id;
    100         /** Hardware type. */
     113        /** Hardware type.
     114         */
    101115        hw_type_t hardware;
    102         /** Packet dimension. */
     116        /** Packet dimension.
     117         */
    103118        packet_dimension_t packet_dimension;
    104         /** Device module phone. */
     119        /** Device module phone.
     120         */
    105121        int phone;
    106        
    107         /**
    108          * Protocol map.
    109          * Address map for each protocol.
     122        /** Protocol map.
     123         *  Address map for each protocol.
    110124         */
    111125        arp_protos_t protos;
    112        
    113         /** Device module service. */
     126        /** Device module service.
     127        */
    114128        services_t service;
    115129};
    116130
    117 /** ARP global data. */
    118 struct arp_globals {
    119         /** ARP address cache. */
     131/** ARP global data.
     132 */
     133struct  arp_globals{
     134        /** ARP address cache.
     135         */
    120136        arp_cache_t cache;
    121        
    122         /**
    123          * The client connection processing function.
    124          * The module skeleton propagates its own one.
     137        /** The client connection processing function.
     138         *  The module skeleton propagates its own one.
    125139         */
    126140        async_client_conn_t client_connection;
    127        
    128         /** Networking module phone. */
     141        /** Networking module phone.
     142        */
    129143        int net_phone;
    130         /** Safety lock. */
     144        /** Safety lock.
     145         */
    131146        fibril_rwlock_t lock;
    132147};
    133148
    134 /** ARP protocol specific data. */
    135 struct arp_proto {
    136         /** Actual device protocol address. */
    137         measured_string_t *addr;
    138         /** Actual device protocol address data. */
    139         char *addr_data;
    140         /** Address map. */
     149/** ARP protocol specific data.
     150 */
     151struct arp_proto{
     152        /** Actual device protocol address.
     153         */
     154        measured_string_ref addr;
     155        /** Actual device protocol address data.
     156         */
     157        char * addr_data;
     158        /** Address map.
     159         */
    141160        arp_addr_t addresses;
    142         /** Protocol service. */
     161        /** Protocol service.
     162         */
    143163        services_t service;
    144164};
Note: See TracChangeset for help on using the changeset viewer.