Hi!
> Returns unused port number for specified domain/type.
> 
> Signed-off-by: Jan Stancek <[email protected]>
> ---
>  include/test.h |    7 +++++
>  lib/tst_net.c  |   80 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 87 insertions(+), 0 deletions(-)
>  create mode 100644 lib/tst_net.c
> 
> diff --git a/include/test.h b/include/test.h
> index 81fca3e..49a0f47 100644
> --- a/include/test.h
> +++ b/include/test.h
> @@ -288,6 +288,13 @@ int tst_fill_file(const char *path, char pattern, size_t 
> bs, size_t bcount);
>  uid_t tst_get_unused_uid(void);
>  gid_t tst_get_unused_gid(void);
>  
> +/* lib/tst_net.c
> + *
> + * Return unused port
> + */
> +unsigned short tst_get_unused_port(unsigned short family, int type,
> +     void (cleanup_fn)(void));

Just am minor nit to the API. Most of the tst_ functions as well as
SAFE_MACROS() have cleanup callback as first parameter. Let's be
consistent with that.

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to