Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nic/include/nic.h

    r062d900 r77a69ea  
    4040
    4141#include <adt/list.h>
    42 #include <adt/hash_table.h>
    4342#include <ddf/driver.h>
    4443#include <device/hw_res_parsed.h>
     
    5453 */
    5554typedef struct nic_wol_virtue {
    56         ht_link_t item;
     55        link_t item;
    5756        nic_wv_id_t id;
    5857        nic_wv_type_t type;
     
    8483 */
    8584typedef void (*send_frame_handler)(nic_t *, void *, size_t);
    86 
    8785/**
    8886 * The handler for transitions between driver states.
     
    9694 */
    9795typedef int (*state_change_handler)(nic_t *);
    98 
    9996/**
    10097 * Handler for unicast filtering mode change.
     
    109106 */
    110107typedef int (*unicast_mode_change_handler)(nic_t *,
    111     nic_unicast_mode_t, const nic_address_t *, size_t);
    112 
     108        nic_unicast_mode_t, const nic_address_t *, size_t);
    113109/**
    114110 * Handler for multicast filtering mode change.
     
    123119 */
    124120typedef int (*multicast_mode_change_handler)(nic_t *,
    125     nic_multicast_mode_t, const nic_address_t *, size_t);
    126 
     121        nic_multicast_mode_t, const nic_address_t *, size_t);
    127122/**
    128123 * Handler for broadcast filtering mode change.
     
    135130 */
    136131typedef int (*broadcast_mode_change_handler)(nic_t *, nic_broadcast_mode_t);
    137 
    138132/**
    139133 * Handler for blocked sources list change.
     
    144138 */
    145139typedef void (*blocked_sources_change_handler)(nic_t *,
    146     const nic_address_t *, size_t);
    147 
     140        const nic_address_t *, size_t);
    148141/**
    149142 * Handler for VLAN filtering mask change.
     
    152145 */
    153146typedef void (*vlan_mask_change_handler)(nic_t *, const nic_vlan_mask_t *);
    154 
    155147/**
    156148 * Handler called when a WOL virtue is added.
     
    173165 */
    174166typedef int (*wol_virtue_add_handler)(nic_t *, const nic_wol_virtue_t *);
    175 
    176167/**
    177168 * Handler called when a WOL virtue is removed.
     
    183174 */
    184175typedef void (*wol_virtue_remove_handler)(nic_t *, const nic_wol_virtue_t *);
    185 
    186176/**
    187177 * Handler for poll mode change.
     
    196186 */
    197187typedef int (*poll_mode_change_handler)(nic_t *,
    198     nic_poll_mode_t, const struct timeval *);
    199 
     188        nic_poll_mode_t, const struct timeval *);
    200189/**
    201190 * Event handler called when the NIC should poll its buffers for a new frame
     
    213202extern int nic_driver_init(const char *);
    214203extern void nic_driver_implement(driver_ops_t *, ddf_dev_ops_t *,
    215     nic_iface_t *);
     204        nic_iface_t *);
    216205
    217206/* Functions called in add_device */
     
    221210extern void nic_set_send_frame_handler(nic_t *, send_frame_handler);
    222211extern void nic_set_state_change_handlers(nic_t *,
    223     state_change_handler, state_change_handler, state_change_handler);
     212        state_change_handler, state_change_handler, state_change_handler);
    224213extern void nic_set_filtering_change_handlers(nic_t *,
    225     unicast_mode_change_handler, multicast_mode_change_handler,
    226     broadcast_mode_change_handler, blocked_sources_change_handler,
    227     vlan_mask_change_handler);
     214        unicast_mode_change_handler, multicast_mode_change_handler,
     215        broadcast_mode_change_handler, blocked_sources_change_handler,
     216        vlan_mask_change_handler);
    228217extern void nic_set_wol_virtue_change_handlers(nic_t *,
    229     wol_virtue_add_handler, wol_virtue_remove_handler);
     218        wol_virtue_add_handler, wol_virtue_remove_handler);
    230219extern void nic_set_poll_handlers(nic_t *,
    231     poll_mode_change_handler, poll_request_handler);
     220        poll_mode_change_handler, poll_request_handler);
    232221
    233222/* General driver functions */
     
    243232extern int nic_report_poll_mode(nic_t *, nic_poll_mode_t, struct timeval *);
    244233extern void nic_query_address(nic_t *, nic_address_t *);
     234extern void nic_received_noneth_frame(nic_t *, void *, size_t);
    245235extern void nic_received_frame(nic_t *, nic_frame_t *);
    246236extern void nic_received_frame_list(nic_t *, nic_frame_list_t *);
     
    265255extern void nic_report_hw_filtering(nic_t *, int, int, int);
    266256extern void nic_query_unicast(const nic_t *,
    267     nic_unicast_mode_t *, size_t, nic_address_t *, size_t *);
     257        nic_unicast_mode_t *, size_t, nic_address_t *, size_t *);
    268258extern void nic_query_multicast(const nic_t *,
    269     nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
     259        nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
    270260extern void nic_query_broadcast(const nic_t *, nic_broadcast_mode_t *);
    271261extern void nic_query_blocked_sources(const nic_t *,
    272     size_t, nic_address_t *, size_t *);
     262        size_t, nic_address_t *, size_t *);
    273263extern int nic_query_vlan_mask(const nic_t *, nic_vlan_mask_t *);
    274264extern int nic_query_wol_max_caps(const nic_t *, nic_wv_type_t);
Note: See TracChangeset for help on using the changeset viewer.