Ignore:
Timestamp:
2015-05-28T15:31:10Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d48c7e
Parents:
2989c7e
Message:

Simple implementation of amap and portrng.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nettl/include/nettl/portrng.h

    r2989c7e rab6326bc  
    3737#define LIBNETTL_PORTRNG_H_
    3838
     39#include <stdbool.h>
    3940#include <stdint.h>
    4041
     42/** Allocated port */
    4143typedef struct {
     44        /** Link to portrng_t.used */
     45        link_t lprng;
     46        /** Port number */
     47        uint16_t pn;
     48} portrng_port_t;
     49
     50typedef struct {
     51        list_t used; /* of portrng_port_t */
    4252} portrng_t;
    4353
     
    4858extern int portrng_create(portrng_t **);
    4959extern void portrng_destroy(portrng_t *);
    50 extern int portrng_alloc_specific(portrng_t *, uint16_t, void *,
    51     portrng_flags_t);
    52 extern int portrng_alloc_dynamic(portrng_t *, void *, uint16_t *);
     60extern int portrng_alloc(portrng_t *, uint16_t, void *,
     61    portrng_flags_t, uint16_t *);
    5362extern void portrng_free_port(portrng_t *, uint16_t);
     63extern bool portrng_empty(portrng_t *);
    5464
    5565#endif
Note: See TracChangeset for help on using the changeset viewer.