Changeset ab6326bc in mainline for uspace/lib/nettl/include
- Timestamp:
- 2015-05-28T15:31:10Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d48c7e
- Parents:
- 2989c7e
- Location:
- uspace/lib/nettl/include/nettl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nettl/include/nettl/amap.h
r2989c7e rab6326bc 37 37 #define LIBNETTL_AMAP_H_ 38 38 39 #include <adt/list.h> 39 40 #include <inet/endpoint.h> 40 41 #include <nettl/portrng.h> … … 43 44 /** Port range for (remote endpoint, local address) */ 44 45 typedef struct { 46 /** Link to amap_t.repla */ 47 link_t lamap; 45 48 /** Remote endpoint */ 46 49 inet_ep_t rep; … … 53 56 /** Port range for local address */ 54 57 typedef struct { 58 /** Link to amap_t.laddr */ 59 link_t lamap; 55 60 /** Local address */ 56 61 inet_addr_t laddr; … … 61 66 /** Port range for local link */ 62 67 typedef struct { 68 /** Link to amap_t.llink */ 69 link_t lamap; 63 70 /** Local link ID */ 64 71 service_id_t llink; … … 75 82 /** Local links */ 76 83 list_t llink; /* of amap_llink_t */ 84 /** Nothing specified (listen on all local adresses) */ 85 portrng_t *unspec; 77 86 } amap_t; 78 87 -
uspace/lib/nettl/include/nettl/portrng.h
r2989c7e rab6326bc 37 37 #define LIBNETTL_PORTRNG_H_ 38 38 39 #include <stdbool.h> 39 40 #include <stdint.h> 40 41 42 /** Allocated port */ 41 43 typedef struct { 44 /** Link to portrng_t.used */ 45 link_t lprng; 46 /** Port number */ 47 uint16_t pn; 48 } portrng_port_t; 49 50 typedef struct { 51 list_t used; /* of portrng_port_t */ 42 52 } portrng_t; 43 53 … … 48 58 extern int portrng_create(portrng_t **); 49 59 extern 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 *); 60 extern int portrng_alloc(portrng_t *, uint16_t, void *, 61 portrng_flags_t, uint16_t *); 53 62 extern void portrng_free_port(portrng_t *, uint16_t); 63 extern bool portrng_empty(portrng_t *); 54 64 55 65 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
