Ignore:
File:
1 edited

Legend:

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

    r77a69ea r062d900  
    4040
    4141#include <adt/list.h>
     42#include <adt/hash_table.h>
    4243#include <ddf/driver.h>
    4344#include <device/hw_res_parsed.h>
     
    5354 */
    5455typedef struct nic_wol_virtue {
    55         link_t item;
     56        ht_link_t item;
    5657        nic_wv_id_t id;
    5758        nic_wv_type_t type;
     
    8384 */
    8485typedef void (*send_frame_handler)(nic_t *, void *, size_t);
     86
    8587/**
    8688 * The handler for transitions between driver states.
     
    9496 */
    9597typedef int (*state_change_handler)(nic_t *);
     98
    9699/**
    97100 * Handler for unicast filtering mode change.
     
    106109 */
    107110typedef int (*unicast_mode_change_handler)(nic_t *,
    108         nic_unicast_mode_t, const nic_address_t *, size_t);
     111    nic_unicast_mode_t, const nic_address_t *, size_t);
     112
    109113/**
    110114 * Handler for multicast filtering mode change.
     
    119123 */
    120124typedef int (*multicast_mode_change_handler)(nic_t *,
    121         nic_multicast_mode_t, const nic_address_t *, size_t);
     125    nic_multicast_mode_t, const nic_address_t *, size_t);
     126
    122127/**
    123128 * Handler for broadcast filtering mode change.
     
    130135 */
    131136typedef int (*broadcast_mode_change_handler)(nic_t *, nic_broadcast_mode_t);
     137
    132138/**
    133139 * Handler for blocked sources list change.
     
    138144 */
    139145typedef void (*blocked_sources_change_handler)(nic_t *,
    140         const nic_address_t *, size_t);
     146    const nic_address_t *, size_t);
     147
    141148/**
    142149 * Handler for VLAN filtering mask change.
     
    145152 */
    146153typedef void (*vlan_mask_change_handler)(nic_t *, const nic_vlan_mask_t *);
     154
    147155/**
    148156 * Handler called when a WOL virtue is added.
     
    165173 */
    166174typedef int (*wol_virtue_add_handler)(nic_t *, const nic_wol_virtue_t *);
     175
    167176/**
    168177 * Handler called when a WOL virtue is removed.
     
    174183 */
    175184typedef void (*wol_virtue_remove_handler)(nic_t *, const nic_wol_virtue_t *);
     185
    176186/**
    177187 * Handler for poll mode change.
     
    186196 */
    187197typedef int (*poll_mode_change_handler)(nic_t *,
    188         nic_poll_mode_t, const struct timeval *);
     198    nic_poll_mode_t, const struct timeval *);
     199
    189200/**
    190201 * Event handler called when the NIC should poll its buffers for a new frame
     
    202213extern int nic_driver_init(const char *);
    203214extern void nic_driver_implement(driver_ops_t *, ddf_dev_ops_t *,
    204         nic_iface_t *);
     215    nic_iface_t *);
    205216
    206217/* Functions called in add_device */
     
    210221extern void nic_set_send_frame_handler(nic_t *, send_frame_handler);
    211222extern void nic_set_state_change_handlers(nic_t *,
    212         state_change_handler, state_change_handler, state_change_handler);
     223    state_change_handler, state_change_handler, state_change_handler);
    213224extern void nic_set_filtering_change_handlers(nic_t *,
    214         unicast_mode_change_handler, multicast_mode_change_handler,
    215         broadcast_mode_change_handler, blocked_sources_change_handler,
    216         vlan_mask_change_handler);
     225    unicast_mode_change_handler, multicast_mode_change_handler,
     226    broadcast_mode_change_handler, blocked_sources_change_handler,
     227    vlan_mask_change_handler);
    217228extern void nic_set_wol_virtue_change_handlers(nic_t *,
    218         wol_virtue_add_handler, wol_virtue_remove_handler);
     229    wol_virtue_add_handler, wol_virtue_remove_handler);
    219230extern void nic_set_poll_handlers(nic_t *,
    220         poll_mode_change_handler, poll_request_handler);
     231    poll_mode_change_handler, poll_request_handler);
    221232
    222233/* General driver functions */
     
    232243extern int nic_report_poll_mode(nic_t *, nic_poll_mode_t, struct timeval *);
    233244extern void nic_query_address(nic_t *, nic_address_t *);
    234 extern void nic_received_noneth_frame(nic_t *, void *, size_t);
    235245extern void nic_received_frame(nic_t *, nic_frame_t *);
    236246extern void nic_received_frame_list(nic_t *, nic_frame_list_t *);
     
    255265extern void nic_report_hw_filtering(nic_t *, int, int, int);
    256266extern void nic_query_unicast(const nic_t *,
    257         nic_unicast_mode_t *, size_t, nic_address_t *, size_t *);
     267    nic_unicast_mode_t *, size_t, nic_address_t *, size_t *);
    258268extern void nic_query_multicast(const nic_t *,
    259         nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
     269    nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
    260270extern void nic_query_broadcast(const nic_t *, nic_broadcast_mode_t *);
    261271extern void nic_query_blocked_sources(const nic_t *,
    262         size_t, nic_address_t *, size_t *);
     272    size_t, nic_address_t *, size_t *);
    263273extern int nic_query_vlan_mask(const nic_t *, nic_vlan_mask_t *);
    264274extern int nic_query_wol_max_caps(const nic_t *, nic_wv_type_t);
Note: See TracChangeset for help on using the changeset viewer.