Ignore:
Timestamp:
2011-11-06T22:21:05Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
Children:
898e847
Parents:
2bdf8313 (diff), 7b5f4c9 (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 moved

Legend:

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

    r2bdf8313 rb0f00a9  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2011 Radim Vansa
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libnet
     29/**
     30 * @addtogroup libnic
    3031 * @{
    3132 */
     33/**
     34 * @file
     35 * @brief Wake-on-LAN support
     36 */
    3237
    33 #ifndef LIBNET_NETIF_REMOTE_H_
    34 #define LIBNET_NETIF_REMOTE_H_
     38#ifndef __NIC_WOL_VIRTUES_H__
     39#define __NIC_WOL_VIRTUES_H__
    3540
    36 #include <async.h>
    37 #include <ipc/services.h>
    38 #include <adt/measured_strings.h>
     41#ifndef LIBNIC_INTERNAL
     42#error "This is internal libnic's header, please do not include it"
     43#endif
    3944
    4045#include <net/device.h>
    41 #include <net/packet.h>
     46#include <adt/hash_table.h>
     47#include "nic.h"
    4248
    43 extern int netif_get_addr_req(int, device_id_t, measured_string_t **,
    44     uint8_t **);
    45 extern int netif_probe_req(int, device_id_t, int, void *);
    46 extern int netif_send_msg(int, device_id_t, packet_t *, services_t);
    47 extern int netif_start_req(int, device_id_t);
    48 extern int netif_stop_req(int, device_id_t);
    49 extern int netif_stats_req(int, device_id_t, device_stats_t *);
    50 extern int netif_bind_service(services_t, device_id_t, services_t,
    51     async_client_conn_t);
     49typedef struct nic_wol_virtues {
     50        /**
     51         * Operations for table
     52         */
     53        hash_table_operations_t table_operations;
     54        /**
     55         * WOL virtues hashed by their ID's.
     56         */
     57        hash_table_t table;
     58        /**
     59         * WOL virtues in lists by their type
     60         */
     61        nic_wol_virtue_t *lists[NIC_WV_MAX];
     62        /**
     63         * Number of virtues in the wv_types list
     64         */
     65        size_t lists_sizes[NIC_WV_MAX];
     66        /**
     67         * Counter for the ID's
     68         */
     69        nic_wv_id_t next_id;
     70        /**
     71         * Maximum capabilities
     72         */
     73        int caps_max[NIC_WV_MAX];
     74} nic_wol_virtues_t;
     75
     76extern int nic_wol_virtues_init(nic_wol_virtues_t *);
     77extern void nic_wol_virtues_clear(nic_wol_virtues_t *);
     78extern int nic_wol_virtues_verify(nic_wv_type_t, const void *, size_t);
     79extern int nic_wol_virtues_list(const nic_wol_virtues_t *, nic_wv_type_t type,
     80        size_t max_count, nic_wv_id_t *id_list, size_t *id_count);
     81extern int nic_wol_virtues_add(nic_wol_virtues_t *, nic_wol_virtue_t *);
     82extern nic_wol_virtue_t *nic_wol_virtues_remove(nic_wol_virtues_t *,
     83        nic_wv_id_t);
     84extern const nic_wol_virtue_t *nic_wol_virtues_find(const nic_wol_virtues_t *,
     85        nic_wv_id_t);
    5286
    5387#endif
Note: See TracChangeset for help on using the changeset viewer.