Ignore:
Timestamp:
2015-05-25T21:04:33Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ab6326bc
Parents:
58e9dec
Message:

Association map / portrange prototype.

File:
1 moved

Legend:

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

    r58e9dec r2989c7e  
    2727 */
    2828
    29 /** @addtogroup udp
     29/** @addtogroup libnettl
    3030 * @{
    3131 */
    32 /** @file UDP user calls
     32/**
     33 * @file Port range allocator.
    3334 */
    3435
    35 #ifndef UCALL_H
    36 #define UCALL_H
     36#ifndef LIBNETTL_PORTRNG_H_
     37#define LIBNETTL_PORTRNG_H_
    3738
    38 #include <ipc/loc.h>
    39 #include <sys/types.h>
    40 #include "udp_type.h"
     39#include <stdint.h>
    4140
    42 extern udp_error_t udp_uc_create(udp_assoc_t **);
    43 extern void udp_uc_set_iplink(udp_assoc_t *, service_id_t);
    44 extern udp_error_t udp_uc_set_remote(udp_assoc_t *, inet_ep_t *);
    45 extern udp_error_t udp_uc_set_local(udp_assoc_t *, inet_ep_t *);
    46 extern udp_error_t udp_uc_set_local_port(udp_assoc_t *, uint16_t);
    47 extern udp_error_t udp_uc_send(udp_assoc_t *, inet_ep_t *, void *, size_t,
    48     xflags_t);
    49 extern udp_error_t udp_uc_receive(udp_assoc_t *, void *, size_t, size_t *,
    50     xflags_t *, inet_ep_t *);
    51 extern void udp_uc_status(udp_assoc_t *, udp_assoc_status_t *);
    52 extern void udp_uc_destroy(udp_assoc_t *);
    53 extern void udp_uc_reset(udp_assoc_t *);
     41typedef struct {
     42} portrng_t;
     43
     44typedef enum {
     45        pf_allow_system = 0x1
     46} portrng_flags_t;
     47
     48extern int portrng_create(portrng_t **);
     49extern void portrng_destroy(portrng_t *);
     50extern int portrng_alloc_specific(portrng_t *, uint16_t, void *,
     51    portrng_flags_t);
     52extern int portrng_alloc_dynamic(portrng_t *, void *, uint16_t *);
     53extern void portrng_free_port(portrng_t *, uint16_t);
    5454
    5555#endif
Note: See TracChangeset for help on using the changeset viewer.