Ignore:
File:
1 edited

Legend:

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

    re9caf47 r849ed54  
    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>
     
    4343#include <ipc/services.h>
    4444
    45 #include <net/device.h>
    46 #include <net/packet.h>
     45#include <net_device.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;
    5656
    5757/** Type definition of the ARP device specific data pointer.
    58  * @see arp_device
     58 *  @see arp_device
    5959 */
    60 typedef arp_device_t *arp_device_ref;
     60typedef arp_device_t *          arp_device_ref;
    6161
    6262/** Type definition of the ARP global data.
    63  * @see arp_globals
     63 *  @see arp_globals
    6464 */
    65 typedef struct arp_globals arp_globals_t;
     65typedef struct arp_globals      arp_globals_t;
    6666
    6767/** Type definition of the ARP protocol specific data.
    68  * @see arp_proto
     68 *  @see arp_proto
    6969 */
    70 typedef struct arp_proto arp_proto_t;
     70typedef struct arp_proto        arp_proto_t;
    7171
    7272/** Type definition of the ARP protocol specific data pointer.
    73  * @see arp_proto
     73 *  @see arp_proto
    7474 */
    75 typedef arp_proto_t *arp_proto_ref;
     75typedef arp_proto_t *           arp_proto_ref;
    7676
    7777/** ARP address map.
    78  *
    79  * Translates addresses.
    80  * @see generic_char_map.h
     78 *  Translates addresses.
     79 *  @see generic_char_map.h
    8180 */
    82 GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t);
     81GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t)
    8382
    8483/** ARP address cache.
    85  *
    86  * Maps devices to the ARP device specific data.
    87  * @see device.h
     84 *  Maps devices to the ARP device specific data.
     85 *  @see device.h
    8886 */
    89 DEVICE_MAP_DECLARE(arp_cache, arp_device_t);
     87DEVICE_MAP_DECLARE(arp_cache, arp_device_t)
    9088
    9189/** ARP protocol map.
    92  *
    93  * Maps protocol identifiers to the ARP protocol specific data.
    94  * @see int_map.h
     90 *  Maps protocol identifiers to the ARP protocol specific data.
     91 *  @see int_map.h
    9592 */
    96 INT_MAP_DECLARE(arp_protos, arp_proto_t);
     93INT_MAP_DECLARE(arp_protos, arp_proto_t)
    9794
    98 /** ARP device specific data. */
    99 struct arp_device {
    100         /** Actual device hardware address. */
     95/** ARP device specific data.
     96 */
     97struct arp_device{
     98        /** Actual device hardware address.
     99         */
    101100        measured_string_ref addr;
    102         /** Actual device hardware address data. */
    103         char *addr_data;
    104         /** Broadcast device hardware address. */
     101        /** Actual device hardware address data.
     102         */
     103        char * addr_data;
     104        /** Broadcast device hardware address.
     105         */
    105106        measured_string_ref broadcast_addr;
    106         /** Broadcast device hardware address data. */
    107         char *broadcast_data;
    108         /** Device identifier. */
     107        /** Broadcast device hardware address data.
     108         */
     109        char * broadcast_data;
     110        /** Device identifier.
     111         */
    109112        device_id_t device_id;
    110         /** Hardware type. */
     113        /** Hardware type.
     114         */
    111115        hw_type_t hardware;
    112         /** Packet dimension. */
     116        /** Packet dimension.
     117         */
    113118        packet_dimension_t packet_dimension;
    114         /** Device module phone. */
     119        /** Device module phone.
     120         */
    115121        int phone;
    116        
    117         /**
    118          * Protocol map.
    119          * Address map for each protocol.
     122        /** Protocol map.
     123         *  Address map for each protocol.
    120124         */
    121125        arp_protos_t protos;
    122        
    123         /** Device module service. */
     126        /** Device module service.
     127        */
    124128        services_t service;
    125129};
    126130
    127 /** ARP global data. */
    128 struct arp_globals {
    129         /** ARP address cache. */
     131/** ARP global data.
     132 */
     133struct  arp_globals{
     134        /** ARP address cache.
     135         */
    130136        arp_cache_t cache;
    131        
    132         /**
    133          * The client connection processing function.
    134          * The module skeleton propagates its own one.
     137        /** The client connection processing function.
     138         *  The module skeleton propagates its own one.
    135139         */
    136140        async_client_conn_t client_connection;
    137        
    138         /** Networking module phone. */
     141        /** Networking module phone.
     142        */
    139143        int net_phone;
    140         /** Safety lock. */
     144        /** Safety lock.
     145         */
    141146        fibril_rwlock_t lock;
    142147};
    143148
    144 /** ARP protocol specific data. */
    145 struct arp_proto {
    146         /** Actual device protocol address. */
     149/** ARP protocol specific data.
     150 */
     151struct arp_proto{
     152        /** Actual device protocol address.
     153         */
    147154        measured_string_ref addr;
    148         /** Actual device protocol address data. */
    149         char *addr_data;
    150         /** Address map. */
     155        /** Actual device protocol address data.
     156         */
     157        char * addr_data;
     158        /** Address map.
     159         */
    151160        arp_addr_t addresses;
    152         /** Protocol service. */
     161        /** Protocol service.
     162         */
    153163        services_t service;
    154164};
Note: See TracChangeset for help on using the changeset viewer.