X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e2c10f61cfd4d58faa73f006aa74def2c73c8860..9006d78ba8a08a6500c994bb8141f48376448fc4:/include/xbt/peer.h diff --git a/include/xbt/peer.h b/include/xbt/peer.h index 9feb19ec83..dbf8122081 100644 --- a/include/xbt/peer.h +++ b/include/xbt/peer.h @@ -1,10 +1,7 @@ -/* $Id$ */ - /* peer.h - peer (remote processes) management functions */ -/* Copyright (c) 2006 Arnaud Legrand. */ -/* Copyright (c) 2006 Martin Quinson. */ -/* All rights reserved. */ +/* Copyright (c) 2006, 2007, 2009, 2010. The SimGrid Team. + * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -16,18 +13,28 @@ SG_BEGIN_DECL() -typedef struct { - char *name; - int port; -} s_xbt_peer_t, *xbt_peer_t; - -XBT_PUBLIC xbt_peer_t xbt_peer_new(const char *name, int port); -XBT_PUBLIC xbt_peer_t xbt_peer_from_string(const char *peerport); -XBT_PUBLIC xbt_peer_t xbt_peer_copy(xbt_peer_t h); -XBT_PUBLIC void xbt_peer_free(xbt_peer_t peer); -XBT_PUBLIC void xbt_peer_free_voidp(void *d); - +/** @addtogroup XBT_peer + * \brief Helper functions to manipulate remote hosts + * + * This module simply introduces some rather trivial functions to manipulate remote host denomination (in the form hostname:port) + * + * @{ + */ +/** @brief Object describing a remote host (as name:port) */ +typedef struct s_xbt_peer *xbt_peer_t; + +/** @brief Structure describing a remote host (as name:port) */ +typedef struct s_xbt_peer { + char *name; + int port; +} s_xbt_peer_t; + +XBT_PUBLIC(xbt_peer_t) xbt_peer_new(const char *name, int port); +XBT_PUBLIC(xbt_peer_t) xbt_peer_from_string(const char *peerport); +XBT_PUBLIC(xbt_peer_t) xbt_peer_copy(xbt_peer_t h); +XBT_PUBLIC(void) xbt_peer_free(xbt_peer_t peer); +XBT_PUBLIC(void) xbt_peer_free_voidp(void *d); + +/** @} */ SG_END_DECL() - - -#endif /* XBT_PEER_H */ +#endif /* XBT_PEER_H */