Ignore:
File:
1 edited

Legend:

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

    ra64c64d r91478aa  
    9090 *  @see device.h
    9191 */
    92 DEVICE_MAP_DECLARE(ip_netifs, ip_netif_t)
     92DEVICE_MAP_DECLARE( ip_netifs, ip_netif_t )
    9393
    9494/** IP registered protocols.
     
    9696 *  @see int_map.h
    9797 */
    98 INT_MAP_DECLARE(ip_protos, ip_proto_t)
     98INT_MAP_DECLARE( ip_protos, ip_proto_t )
    9999
    100100/** IP routing table.
    101101 *  @see generic_field.h
    102102 */
    103 GENERIC_FIELD_DECLARE(ip_routes, ip_route_t)
     103GENERIC_FIELD_DECLARE( ip_routes, ip_route_t )
    104104
    105105/** IP network interface specific data.
    106106 */
    107107struct  ip_netif{
     108        /** Device identifier.
     109         */
     110        device_id_t     device_id;
     111        /** Netif module service.
     112         */
     113        services_t      service;
     114        /** Netif module phone.
     115         */
     116        int                     phone;
    108117        /** ARP module.
    109118         *  Assigned if using ARP.
    110119         */
    111         module_ref arp;
     120        module_ref      arp;
     121        /** IP version.
     122         */
     123        int                     ipv;
     124        /** Indicates whether using DHCP.
     125         */
     126        int                     dhcp;
     127        /** Indicates whether IP routing is enabled.
     128         */
     129        int                     routing;
     130        /** Device state.
     131         */
     132        device_state_t  state;
    112133        /** Broadcast address.
    113134         */
    114         in_addr_t broadcast;
    115         /** Device identifier.
    116          */
    117         device_id_t device_id;
    118         /** Indicates whether using DHCP.
    119          */
    120         int dhcp;
    121         /** IP version.
    122          */
    123         int ipv;
     135        in_addr_t       broadcast;
     136        /** Routing table.
     137         */
     138        ip_routes_t     routes;
    124139        /** Packet dimension.
    125140         */
    126         packet_dimension_t packet_dimension;
    127         /** Netif module phone.
    128          */
    129         int phone;
    130         /** Routing table.
    131          */
    132         ip_routes_t routes;
    133         /** Indicates whether IP routing is enabled.
    134          */
    135         int routing;
    136         /** Netif module service.
     141        packet_dimension_t      packet_dimension;
     142};
     143
     144/** IP protocol specific data.
     145 */
     146struct ip_proto{
     147        /** Protocol number.
     148         */
     149        int     protocol;
     150        /** Protocol module service.
    137151         */
    138152        services_t service;
    139         /** Device state.
    140          */
    141         device_state_t state;
    142 };
    143 
    144 /** IP protocol specific data.
    145  */
    146 struct ip_proto{
    147153        /** Protocol module phone.
    148154         */
    149         int phone;
    150         /** Protocol number.
    151          */
    152         int protocol;
     155        int     phone;
    153156        /** Protocol packet receiving function.
    154157         */
    155158        tl_received_msg_t received_msg;
    156         /** Protocol module service.
    157          */
    158         services_t service;
    159159};
    160160
     
    164164        /** Target address.
    165165         */
    166         in_addr_t address;
     166        in_addr_t               address;
     167        /** Target network mask.
     168         */
     169        in_addr_t               netmask;
    167170        /** Gateway.
    168171         */
    169         in_addr_t gateway;
     172        in_addr_t               gateway;
    170173        /** Parent netif.
    171174         */
    172         ip_netif_ref netif;
    173         /** Target network mask.
    174          */
    175         in_addr_t netmask;
     175        ip_netif_ref    netif;
    176176};
    177177
     
    179179 */
    180180struct  ip_globals{
     181        /** Networking module phone.
     182         */
     183        int                     net_phone;
     184        /** Registered network interfaces.
     185         */
     186        ip_netifs_t     netifs;
     187        /** Netifs safeyt lock.
     188         */
     189        fibril_rwlock_t netifs_lock;
     190        /** Registered protocols.
     191         */
     192        ip_protos_t     protos;
     193        /** Protocols safety lock.
     194         */
     195        fibril_rwlock_t protos_lock;
     196        /** Default gateway.
     197         */
     198        ip_route_t      gateway;
     199        /** Known support modules.
     200         */
     201        modules_t       modules;
    181202        /** Default client connection function for support modules.
    182203         */
    183204        async_client_conn_t client_connection;
    184         /** Default gateway.
    185          */
    186         ip_route_t gateway;
     205        /** Packet counter.
     206         */
     207        uint16_t        packet_counter;
    187208        /** Safety lock.
    188209         */
    189         fibril_rwlock_t lock;
    190         /** Known support modules.
    191          */
    192         modules_t modules;
    193         /** Networking module phone.
    194          */
    195         int net_phone;
    196         /** Registered network interfaces.
    197          */
    198         ip_netifs_t netifs;
    199         /** Netifs safeyt lock.
    200          */
    201         fibril_rwlock_t netifs_lock;
    202         /** Packet counter.
    203          */
    204         uint16_t packet_counter;
    205         /** Registered protocols.
    206          */
    207         ip_protos_t protos;
    208         /** Protocols safety lock.
    209          */
    210         fibril_rwlock_t protos_lock;
     210        fibril_rwlock_t lock;
    211211};
    212212
Note: See TracChangeset for help on using the changeset viewer.