Revision 534e126a include/net_helper.h

View differences:

include/net_helper.h
118 118
*
119 119
* Give a string representation of a nodeID.
120 120
* @param[in] s A pointer to the nodeID to be printed.
121
* @return A string representing the nodeID.
121
* @param[out] addr A pointer to the buffer where to write the address
122
* @param[in] len The length of the addr buffer
123
* @return >= 0 on success, or < 0 on error (buffer too small)
122 124
*/
123
const char *node_addr(const struct nodeID *s);
125
int node_addr(const struct nodeID *s, char *addr, int len);
124 126

  
125 127
/**
126 128
* @brief Create a nodeID structure from a serialized object.
......
148 150
*
149 151
* Serialize the public IP address of a given node and return it.
150 152
* @param[in] s A pointer to the nodeID.
151
* @return the publicly accessible IP address of the node.
153
* @param[out] ip A  pointer to the buffer where to store the ip address
154
* @param[in] len The length of the ip buffer
155
* @return >= 0 on success, or < 0 on error (buffer too small)
152 156
*/
153
const char *node_ip(const struct nodeID *s);
157
int node_ip(const struct nodeID *s, char *ip, int len);
154 158

  
155 159
#endif /* NET_HELPER_H */

Also available in: Unified diff