Changeset f2d2c604 in mainline for uspace/srv/net/nil/eth/eth.h


Ignore:
Timestamp:
2010-10-27T21:51:14Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
069015f2
Parents:
e7f6389 (diff), 0a3fbc7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/net.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/nil/eth/eth.h

    re7f6389 rf2d2c604  
    3232
    3333/** @file
    34  *  Ethernet module.
     34 * Ethernet module.
    3535 */
    3636
    37 #ifndef __NET_ETH_H__
    38 #define __NET_ETH_H__
     37#ifndef NET_ETH_H_
     38#define NET_ETH_H_
    3939
    4040#include <fibril_synch.h>
     
    4545
    4646/** Type definition of the Ethernet global data.
    47  *  @see eth_globals
     47 * @see eth_globals
    4848 */
    49 typedef struct eth_globals      eth_globals_t;
     49typedef struct eth_globals eth_globals_t;
    5050
    5151/** Type definition of the Ethernet device specific data.
    52  *  @see eth_device
     52 * @see eth_device
    5353 */
    54 typedef struct eth_device       eth_device_t;
     54typedef struct eth_device eth_device_t;
    5555
    5656/** Type definition of the Ethernet device specific data pointer.
    57  *  @see eth_device
     57 * @see eth_device
    5858 */
    59 typedef eth_device_t *          eth_device_ref;
     59typedef eth_device_t *eth_device_ref;
    6060
    6161/** Type definition of the Ethernet protocol specific data.
    62  *  @see eth_proto
     62 * @see eth_proto
    6363 */
    64 typedef struct eth_proto        eth_proto_t;
     64typedef struct eth_proto eth_proto_t;
    6565
    6666/** Type definition of the Ethernet protocol specific data pointer.
    67  *  @see eth_proto
     67 * @see eth_proto
    6868 */
    69 typedef eth_proto_t *           eth_proto_ref;
     69typedef eth_proto_t *eth_proto_ref;
    7070
    7171/** Ethernet device map.
    72  *  Maps devices to the Ethernet device specific data.
    73  *  @see device.h
     72 * Maps devices to the Ethernet device specific data.
     73 * @see device.h
    7474 */
    75 DEVICE_MAP_DECLARE(eth_devices, eth_device_t)
     75DEVICE_MAP_DECLARE(eth_devices, eth_device_t);
    7676
    7777/** Ethernet protocol map.
    78  *  Maps protocol identifiers to the Ethernet protocol specific data.
    79  *  @see int_map.h
     78 * Maps protocol identifiers to the Ethernet protocol specific data.
     79 * @see int_map.h
    8080 */
    81 INT_MAP_DECLARE(eth_protos, eth_proto_t)
     81INT_MAP_DECLARE(eth_protos, eth_proto_t);
    8282
    83 /** Ethernet device specific data.
    84  */
    85 struct  eth_device{
    86         /** Device identifier.
    87          */
     83/** Ethernet device specific data. */
     84struct eth_device {
     85        /** Device identifier. */
    8886        device_id_t device_id;
    89         /** Device driver service.
    90          */
     87        /** Device driver service. */
    9188        services_t service;
    92         /** Driver phone.
    93          */
     89        /** Driver phone. */
    9490        int phone;
    95         /** Maximal transmission unit.
    96          */
     91        /** Maximal transmission unit. */
    9792        size_t mtu;
    98         /** Various device flags.
    99          *  @see ETH_DUMMY
    100          *  @see ETH_MODE_MASK
     93       
     94        /**
     95         * Various device flags.
     96         * @see ETH_DUMMY
     97         * @see ETH_MODE_MASK
    10198         */
    10299        int flags;
    103         /** Actual device hardware address.
    104         */
     100       
     101        /** Actual device hardware address. */
    105102        measured_string_ref addr;
    106         /** Actual device hardware address data.
    107          */
    108         char * addr_data;
     103        /** Actual device hardware address data. */
     104        char *addr_data;
    109105};
    110106
    111 /** Ethernet protocol specific data.
    112  */
    113 struct eth_proto{
    114         /** Protocol service.
    115          */
     107/** Ethernet protocol specific data. */
     108struct eth_proto {
     109        /** Protocol service. */
    116110        services_t service;
    117         /** Protocol identifier.
    118          */
     111        /** Protocol identifier. */
    119112        int protocol;
    120         /** Protocol module phone.
    121          */
     113        /** Protocol module phone. */
    122114        int phone;
    123115};
    124116
    125 /** Ethernet global data.
    126  */
    127 struct  eth_globals{
    128         /** Networking module phone.
    129          */
     117/** Ethernet global data. */
     118struct eth_globals {
     119        /** Networking module phone. */
    130120        int net_phone;
    131         /** Safety lock for devices.
    132          */
     121        /** Safety lock for devices. */
    133122        fibril_rwlock_t devices_lock;
    134         /** All known Ethernet devices.
    135          */
     123        /** All known Ethernet devices. */
    136124        eth_devices_t devices;
    137         /** Safety lock for protocols.
    138          */
     125        /** Safety lock for protocols. */
    139126        fibril_rwlock_t protos_lock;
    140         /** Protocol map.
    141          *  Service phone map for each protocol.
     127       
     128        /**
     129         * Protocol map.
     130         * Service phone map for each protocol.
    142131         */
    143132        eth_protos_t protos;
    144         /** Broadcast device hardware address.
    145         */
     133       
     134        /** Broadcast device hardware address. */
    146135        measured_string_ref broadcast_addr;
    147136};
Note: See TracChangeset for help on using the changeset viewer.