Changeset e526f08 in mainline


Ignore:
Timestamp:
2010-10-14T19:37:44Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a358279
Parents:
db5f8d3
Message:

Move net_device.h to standard library.

Location:
uspace
Files:
31 edited
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/net/device.h

    rdb5f8d3 re526f08  
    2727 */
    2828
    29 /** @addtogroup netif
    30  *  @{
     29/** @addtogroup libc
     30 * @{
    3131 */
    3232
    3333/** @file
    34  *  Device identifier, state and usage statistics.
     34 * Device identifier, state and usage statistics.
    3535 */
    3636
    37 #ifndef __NET_DEVICE_ID_TYPE_H__
    38 #define __NET_DEVICE_ID_TYPE_H__
     37#ifndef LIBC_DEVICE_ID_TYPE_H_
     38#define LIBC_DEVICE_ID_TYPE_H_
    3939
    4040#include <adt/int_map.h>
    4141
    42 /** Device identifier to generic type map declaration.
    43  */
    44 #define DEVICE_MAP_DECLARE              INT_MAP_DECLARE
     42/** Device identifier to generic type map declaration. */
     43#define DEVICE_MAP_DECLARE      INT_MAP_DECLARE
    4544
    46 /** Device identifier to generic type map implementation.
    47  */
     45/** Device identifier to generic type map implementation. */
    4846#define DEVICE_MAP_IMPLEMENT    INT_MAP_IMPLEMENT
    4947
    50 /** Invalid device identifier.
    51  */
    52 #define DEVICE_INVALID_ID               (-1)
     48/** Invalid device identifier. */
     49#define DEVICE_INVALID_ID       (-1)
    5350
    54 /** Device identifier type.
    55  */
    56 typedef int     device_id_t;
     51/** Device identifier type. */
     52typedef int device_id_t;
    5753
    58 /** Device state type.
    59  */
    60 typedef enum device_state       device_state_t;
     54/** Device state type. */
     55typedef enum device_state device_state_t;
    6156
    6257/** Type definition of the device usage statistics.
    63  *  @see device_stats
     58 * @see device_stats
    6459 */
    65 typedef struct device_stats     device_stats_t;
     60typedef struct device_stats device_stats_t;
    6661
    6762/** Type definition of the device usage statistics pointer.
    68  *  @see device_stats
     63 * @see device_stats
    6964 */
    70 typedef device_stats_t *        device_stats_ref;
     65typedef device_stats_t *device_stats_ref;
    7166
    72 /** Device state.
    73  */
    74 enum    device_state{
    75         /** Device not present or not initialized.
    76          */
     67/** Device state. */
     68enum device_state {
     69        /** Device not present or not initialized. */
    7770        NETIF_NULL = 0,
    78         /** Device present and stopped.
    79          */
     71        /** Device present and stopped. */
    8072        NETIF_STOPPED,
    81         /** Device present and active.
    82          */
     73        /** Device present and active. */
    8374        NETIF_ACTIVE,
    84         /** Device present but unable to transmit.
    85          */
     75        /** Device present but unable to transmit. */
    8676        NETIF_CARRIER_LOST
    8777};
    8878
    89 /** Device usage statistics.
    90  */
    91 struct  device_stats{
    92         /** Total packets received.
    93          */
     79/** Device usage statistics. */
     80struct device_stats {
     81        /** Total packets received. */
    9482        unsigned long receive_packets;
    95         /** Total packets transmitted.
    96          */
     83        /** Total packets transmitted. */
    9784        unsigned long send_packets;
    98         /** Total bytes received.
    99          */
     85        /** Total bytes received. */
    10086        unsigned long receive_bytes;
    101         /** Total bytes transmitted.
    102          */
     87        /** Total bytes transmitted. */
    10388        unsigned long send_bytes;
    104         /** Bad packets received counter.
    105          */
     89        /** Bad packets received counter. */
    10690        unsigned long receive_errors;
    107         /** Packet transmition problems counter.
    108          */
     91        /** Packet transmition problems counter. */
    10992        unsigned long send_errors;
    110         /** No space in buffers counter.
    111          */
     93        /** No space in buffers counter. */
    11294        unsigned long receive_dropped;
    113         /** No space available counter.
    114          */
     95        /** No space available counter. */
    11596        unsigned long send_dropped;
    116         /** Total multicast packets received.
    117          */
     97        /** Total multicast packets received. */
    11898        unsigned long multicast;
    119         /** The number of collisions due to congestion on the medium.
    120          */
     99        /** The number of collisions due to congestion on the medium. */
    121100        unsigned long collisions;
    122101
    123         /* detailed receive_errors: */
    124         /** Received packet length error counter.
    125         */
     102        /* detailed receive_errors */
     103
     104        /** Received packet length error counter. */
    126105        unsigned long receive_length_errors;
    127         /** Receiver buffer overflow counter.
    128          */
     106        /** Receiver buffer overflow counter. */
    129107        unsigned long receive_over_errors;
    130         /** Received packet with crc error counter.
    131          */
     108        /** Received packet with crc error counter. */
    132109        unsigned long receive_crc_errors;
    133         /** Received frame alignment error counter.
    134          */
     110        /** Received frame alignment error counter. */
    135111        unsigned long receive_frame_errors;
    136         /** Receiver fifo overrun counter.
    137          */
     112        /** Receiver fifo overrun counter. */
    138113        unsigned long receive_fifo_errors;
    139         /** Receiver missed packet counter.
    140          */
     114        /** Receiver missed packet counter. */
    141115        unsigned long receive_missed_errors;
    142116
    143117        /* detailed send_errors */
    144         /** Transmitter aborted counter.
    145         */
     118
     119        /** Transmitter aborted counter. */
    146120        unsigned long send_aborted_errors;
    147         /** Transmitter carrier errors counter.
    148          */
     121        /** Transmitter carrier errors counter. */
    149122        unsigned long send_carrier_errors;
    150         /** Transmitter fifo overrun counter.
    151          */
     123        /** Transmitter fifo overrun counter. */
    152124        unsigned long send_fifo_errors;
    153         /** Transmitter carrier errors counter.
    154          */
     125        /** Transmitter carrier errors counter. */
    155126        unsigned long send_heartbeat_errors;
    156         /** Transmitter window errors counter.
    157          */
     127        /** Transmitter window errors counter. */
    158128        unsigned long send_window_errors;
    159129
    160130        /* for cslip etc */
    161         /** Total compressed packets received.
    162         */
     131       
     132        /** Total compressed packets received. */
    163133        unsigned long receive_compressed;
    164         /** Total compressed packet transmitted.
    165          */
     134        /** Total compressed packet transmitted. */
    166135        unsigned long send_compressed;
    167136};
     
    171140/** @}
    172141 */
    173 
  • uspace/lib/net/generic/net_remote.c

    rdb5f8d3 re526f08  
    4242#include <net_messages.h>
    4343#include <net/modules.h>
    44 #include <net_device.h>
     44#include <net/device.h>
    4545#include <net_interface.h>
    4646#include <adt/measured_strings.h>
  • uspace/lib/net/il/arp_remote.c

    rdb5f8d3 re526f08  
    4343#include <net_messages.h>
    4444#include <net/modules.h>
    45 #include <net_device.h>
     45#include <net/device.h>
    4646#include <arp_interface.h>
    4747#include <adt/measured_strings.h>
  • uspace/lib/net/il/ip_remote.c

    rdb5f8d3 re526f08  
    4444#include <net_messages.h>
    4545#include <net/modules.h>
    46 #include <net_device.h>
     46#include <net/device.h>
    4747#include <net/inet.h>
    4848#include <ip_interface.h>
  • uspace/lib/net/include/arp_interface.h

    rdb5f8d3 re526f08  
    3535
    3636#include <adt/measured_strings.h>
    37 #include <net_device.h>
     37#include <net/device.h>
    3838
    3939/** @name ARP module interface
  • uspace/lib/net/include/icmp_interface.h

    rdb5f8d3 re526f08  
    3737#include <sys/types.h>
    3838
    39 #include <net_device.h>
     39#include <net/device.h>
    4040#include <adt/measured_strings.h>
    4141#include <net/packet.h>
  • uspace/lib/net/include/il_interface.h

    rdb5f8d3 re526f08  
    4444
    4545#include <net_messages.h>
    46 #include <net_device.h>
     46#include <net/device.h>
    4747#include <net/packet.h>
    4848#include <packet_client.h>
  • uspace/lib/net/include/ip_interface.h

    rdb5f8d3 re526f08  
    3838#include <ipc/services.h>
    3939
    40 #include <net_device.h>
     40#include <net/device.h>
    4141#include <net/packet.h>
    4242
  • uspace/lib/net/include/net_interface.h

    rdb5f8d3 re526f08  
    3636#include <ipc/services.h>
    3737
    38 #include <net_device.h>
     38#include <net/device.h>
    3939#include <adt/measured_strings.h>
    4040
  • uspace/lib/net/include/netif_local.h

    rdb5f8d3 re526f08  
    4646
    4747#include <adt/measured_strings.h>
    48 #include <net_device.h>
     48#include <net/device.h>
    4949#include <net/packet.h>
    5050
  • uspace/lib/net/include/nil_interface.h

    rdb5f8d3 re526f08  
    4343#include <net/packet.h>
    4444#include <nil_messages.h>
    45 #include <net_device.h>
     45#include <net/device.h>
    4646
    4747#define nil_bind_service(service, device_id, me, receiver) \
  • uspace/lib/net/include/socket_core.h

    rdb5f8d3 re526f08  
    4141
    4242#include <net/in.h>
    43 #include <net_device.h>
     43#include <net/device.h>
    4444#include <adt/generic_char_map.h>
    4545#include <adt/dynamic_fifo.h>
  • uspace/lib/net/include/tl_common.h

    rdb5f8d3 re526f08  
    4040#include <net/socket_codes.h>
    4141#include <net/packet.h>
    42 #include <net_device.h>
     42#include <net/device.h>
    4343#include <net/inet.h>
    4444
  • uspace/lib/net/include/tl_interface.h

    rdb5f8d3 re526f08  
    4242
    4343#include <net_messages.h>
    44 #include <net_device.h>
     44#include <net/device.h>
    4545#include <net/packet.h>
    4646#include <packet_client.h>
  • uspace/lib/net/netif/netif_local.c

    rdb5f8d3 re526f08  
    5151#include <packet_remote.h>
    5252#include <adt/measured_strings.h>
    53 #include <net_device.h>
     53#include <net/device.h>
    5454#include <nil_interface.h>
    5555#include <netif_local.h>
  • uspace/lib/net/netif/netif_remote.c

    rdb5f8d3 re526f08  
    4141#include <net/packet.h>
    4242#include <packet_client.h>
    43 #include <net_device.h>
     43#include <net/device.h>
    4444#include <netif_remote.h>
    4545#include <netif_messages.h>
  • uspace/lib/net/nil/nil_remote.c

    rdb5f8d3 re526f08  
    3737
    3838#include <net_messages.h>
    39 #include <net_device.h>
     39#include <net/device.h>
    4040#include <nil_interface.h>
    4141#include <net/packet.h>
  • uspace/lib/net/tl/tl_common.c

    rdb5f8d3 re526f08  
    4848#include <packet_client.h>
    4949#include <packet_remote.h>
    50 #include <net_device.h>
     50#include <net/device.h>
    5151#include <icmp_interface.h>
    5252#include <ip_remote.h>
  • uspace/lib/socket/include/net_messages.h

    rdb5f8d3 re526f08  
    4242#include <ipc/services.h>
    4343
    44 #include <net_device.h>
     44#include <net/device.h>
    4545#include <adt/measured_strings.h>
    4646#include <net/packet.h>
  • uspace/srv/hw/netif/dp8390/dp8390_module.c

    rdb5f8d3 re526f08  
    4848#include <packet_client.h>
    4949#include <adt/measured_strings.h>
    50 #include <net_device.h>
     50#include <net/device.h>
    5151#include <nil_interface.h>
    5252#include <netif_interface.h>
  • uspace/srv/net/il/arp/arp.c

    rdb5f8d3 re526f08  
    5050#include <net_messages.h>
    5151#include <net/modules.h>
    52 #include <net_device.h>
     52#include <net/device.h>
    5353#include <arp_interface.h>
    5454#include <nil_interface.h>
  • uspace/srv/net/il/arp/arp.h

    rdb5f8d3 re526f08  
    4343#include <ipc/services.h>
    4444
    45 #include <net_device.h>
     45#include <net/device.h>
    4646#include <net_hardware.h>
    4747#include <adt/generic_char_map.h>
  • uspace/srv/net/il/ip/ip.c

    rdb5f8d3 re526f08  
    5656#include <arp_interface.h>
    5757#include <net_checksum.h>
    58 #include <net_device.h>
     58#include <net/device.h>
    5959#include <icmp_client.h>
    6060#include <net/icmp_codes.h>
  • uspace/srv/net/il/ip/ip.h

    rdb5f8d3 re526f08  
    4242#include <ipc/services.h>
    4343
    44 #include <net_device.h>
     44#include <net/device.h>
    4545#include <net/inet.h>
    4646#include <ip_interface.h>
  • uspace/srv/net/net/net.c

    rdb5f8d3 re526f08  
    5757#include <il_messages.h>
    5858#include <netif_remote.h>
    59 #include <net_device.h>
     59#include <net/device.h>
    6060#include <nil_interface.h>
    6161#include <net_interface.h>
  • uspace/srv/net/net/net.h

    rdb5f8d3 re526f08  
    4141#include <ipc/ipc.h>
    4242
    43 #include <net_device.h>
     43#include <net/device.h>
    4444#include <adt/char_map.h>
    4545#include <adt/generic_char_map.h>
  • uspace/srv/net/netif/lo/lo.c

    rdb5f8d3 re526f08  
    4848#include <adt/measured_strings.h>
    4949#include <packet_client.h>
    50 #include <net_device.h>
     50#include <net/device.h>
    5151#include <nil_interface.h>
    5252#include <nil_messages.h>
  • uspace/srv/net/nil/eth/eth.c

    rdb5f8d3 re526f08  
    5353#include <ethernet_protocols.h>
    5454#include <protocol_map.h>
    55 #include <net_device.h>
     55#include <net/device.h>
    5656#include <netif_interface.h>
    5757#include <net_interface.h>
  • uspace/srv/net/nil/eth/eth.h

    rdb5f8d3 re526f08  
    4141#include <ipc/services.h>
    4242
    43 #include <net_device.h>
     43#include <net/device.h>
    4444#include <adt/measured_strings.h>
    4545
  • uspace/srv/net/nil/nildummy/nildummy.c

    rdb5f8d3 re526f08  
    4747#include <net_messages.h>
    4848#include <net/modules.h>
    49 #include <net_device.h>
     49#include <net/device.h>
    5050#include <netif_interface.h>
    5151#include <nil_interface.h>
  • uspace/srv/net/nil/nildummy/nildummy.h

    rdb5f8d3 re526f08  
    4141#include <ipc/services.h>
    4242
    43 #include <net_device.h>
     43#include <net/device.h>
    4444#include <adt/measured_strings.h>
    4545
  • uspace/srv/net/tl/tcp/tcp.h

    rdb5f8d3 re526f08  
    4141
    4242#include <net/packet.h>
    43 #include <net_device.h>
     43#include <net/device.h>
    4444#include <socket_core.h>
    4545#include <tl_common.h>
Note: See TracChangeset for help on using the changeset viewer.