Changeset 4687a26c in mainline for uspace/srv/net/il/ip/ip.h


Ignore:
Timestamp:
2010-11-02T18:29:01Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4f35b9ff
Parents:
76e1121f (diff), 28f4adb (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 mainline changes.

File:
1 edited

Legend:

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

    r76e1121f r4687a26c  
    2828
    2929/** @addtogroup ip
    30  *  @{
     30 * @{
    3131 */
    3232
    3333/** @file
    34  *  IP module.
     34 * IP module.
    3535 */
    3636
    37 #ifndef __NET_IP_H__
    38 #define __NET_IP_H__
     37#ifndef NET_IP_H_
     38#define NET_IP_H_
    3939
    4040#include <fibril_synch.h>
     
    4242#include <ipc/services.h>
    4343
    44 #include <net_device.h>
    45 #include <inet.h>
     44#include <net/device.h>
     45#include <net/inet.h>
    4646#include <ip_interface.h>
    4747#include <adt/int_map.h>
     
    5050
    5151/** Type definition of the IP global data.
    52  *  @see ip_globals
     52 * @see ip_globals
    5353 */
    54 typedef struct ip_globals       ip_globals_t;
     54typedef struct ip_globals ip_globals_t;
    5555
    5656/** Type definition of the IP network interface specific data.
    57  *  @see ip_netif
     57 * @see ip_netif
    5858 */
    59 typedef struct ip_netif ip_netif_t;
     59typedef struct ip_netif ip_netif_t;
    6060
    6161/** Type definition of the IP network interface specific data pointer.
    62  *  @see ip_netif
     62 * @see ip_netif
    6363 */
    64 typedef ip_netif_t *    ip_netif_ref;
     64typedef ip_netif_t *ip_netif_ref;
    6565
    6666/** Type definition of the IP protocol specific data.
    67  *  @see ip_proto
     67 * @see ip_proto
    6868 */
    69 typedef struct ip_proto ip_proto_t;
     69typedef struct ip_proto ip_proto_t;
    7070
    7171/** Type definition of the IP protocol specific data pointer.
    72  *  @see ip_proto
     72 * @see ip_proto
    7373 */
    74 typedef ip_proto_t *    ip_proto_ref;
     74typedef ip_proto_t *ip_proto_ref;
    7575
    7676/** Type definition of the IP route specific data.
     
    8282 *  @see ip_route
    8383 */
    84 typedef ip_route_t *    ip_route_ref;
     84typedef ip_route_t *ip_route_ref;
    8585
    8686/** IP network interfaces.
    87  *  Maps devices to the IP network interface specific data.
    88  *  @see device.h
     87 * Maps devices to the IP network interface specific data.
     88 * @see device.h
    8989 */
    90 DEVICE_MAP_DECLARE(ip_netifs, ip_netif_t)
     90DEVICE_MAP_DECLARE(ip_netifs, ip_netif_t);
    9191
    9292/** IP registered protocols.
    93  *  Maps protocols to the IP protocol specific data.
    94  *  @see int_map.h
     93 * Maps protocols to the IP protocol specific data.
     94 * @see int_map.h
    9595 */
    96 INT_MAP_DECLARE(ip_protos, ip_proto_t)
     96INT_MAP_DECLARE(ip_protos, ip_proto_t);
    9797
    9898/** IP routing table.
    99  *  @see generic_field.h
     99 * @see generic_field.h
    100100 */
    101 GENERIC_FIELD_DECLARE(ip_routes, ip_route_t)
     101GENERIC_FIELD_DECLARE(ip_routes, ip_route_t);
    102102
    103 /** IP network interface specific data.
    104  */
    105 struct  ip_netif{
    106         /** ARP module.
    107          *  Assigned if using ARP.
    108          */
     103/** IP network interface specific data. */
     104struct ip_netif {
     105        /** ARP module. Assigned if using ARP. */
    109106        module_ref arp;
    110         /** Broadcast address.
    111          */
     107        /** Broadcast address. */
    112108        in_addr_t broadcast;
    113         /** Device identifier.
    114          */
     109        /** Device identifier. */
    115110        device_id_t device_id;
    116         /** Indicates whether using DHCP.
    117          */
     111        /** Indicates whether using DHCP. */
    118112        int dhcp;
    119         /** IP version.
    120          */
     113        /** IP version. */
    121114        int ipv;
    122         /** Packet dimension.
    123          */
     115        /** Packet dimension. */
    124116        packet_dimension_t packet_dimension;
    125         /** Netif module phone.
    126          */
     117        /** Netif module phone. */
    127118        int phone;
    128         /** Routing table.
    129          */
     119        /** Routing table. */
    130120        ip_routes_t routes;
    131         /** Indicates whether IP routing is enabled.
    132          */
     121        /** Indicates whether IP routing is enabled. */
    133122        int routing;
    134         /** Netif module service.
    135          */
     123        /** Netif module service. */
    136124        services_t service;
    137         /** Device state.
    138          */
     125        /** Device state. */
    139126        device_state_t state;
    140127};
    141128
    142 /** IP protocol specific data.
    143  */
    144 struct ip_proto{
    145         /** Protocol module phone.
    146          */
     129/** IP protocol specific data. */
     130struct ip_proto {
     131        /** Protocol module phone. */
    147132        int phone;
    148         /** Protocol number.
    149          */
     133        /** Protocol number. */
    150134        int protocol;
    151         /** Protocol packet receiving function.
    152          */
     135        /** Protocol packet receiving function. */
    153136        tl_received_msg_t received_msg;
    154         /** Protocol module service.
    155          */
     137        /** Protocol module service. */
    156138        services_t service;
    157139};
    158140
    159 /** IP route specific data.
    160  */
    161 struct ip_route{
    162         /** Target address.
    163          */
     141/** IP route specific data. */
     142struct ip_route {
     143        /** Target address. */
    164144        in_addr_t address;
    165         /** Gateway.
    166          */
     145        /** Gateway. */
    167146        in_addr_t gateway;
    168         /** Parent netif.
    169          */
     147        /** Parent netif. */
    170148        ip_netif_ref netif;
    171         /** Target network mask.
    172          */
     149        /** Target network mask. */
    173150        in_addr_t netmask;
    174151};
    175152
    176 /** IP global data.
    177  */
    178 struct  ip_globals{
    179         /** Default client connection function for support modules.
    180          */
     153/** IP global data. */
     154struct ip_globals {
     155        /** Default client connection function for support modules. */
    181156        async_client_conn_t client_connection;
    182         /** Default gateway.
    183          */
     157        /** Default gateway. */
    184158        ip_route_t gateway;
    185         /** Safety lock.
    186          */
     159        /** Safety lock. */
    187160        fibril_rwlock_t lock;
    188         /** Known support modules.
    189          */
     161        /** Known support modules. */
    190162        modules_t modules;
    191         /** Networking module phone.
    192          */
     163        /** Networking module phone. */
    193164        int net_phone;
    194         /** Registered network interfaces.
    195          */
     165        /** Registered network interfaces. */
    196166        ip_netifs_t netifs;
    197         /** Netifs safeyt lock.
    198          */
     167        /** Netifs safeyt lock. */
    199168        fibril_rwlock_t netifs_lock;
    200         /** Packet counter.
    201          */
     169        /** Packet counter. */
    202170        uint16_t packet_counter;
    203         /** Registered protocols.
    204          */
     171        /** Registered protocols. */
    205172        ip_protos_t protos;
    206         /** Protocols safety lock.
    207          */
     173        /** Protocols safety lock. */
    208174        fibril_rwlock_t protos_lock;
    209175};
Note: See TracChangeset for help on using the changeset viewer.