Skip to content

Commit

Permalink
Export ldms_addr_ntop()
Browse files Browse the repository at this point in the history
  • Loading branch information
nichamon committed Dec 12, 2024
1 parent f495350 commit 8f1564e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 10 additions & 1 deletion ldms/src/core/ldms.h
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,16 @@ struct ldms_addr {
int ldms_xprt_addr(ldms_t x, struct ldms_addr *local_addr,
struct ldms_addr *remote_addr);

const char *ldms_sockaddr_ntop(struct sockaddr *sa, char *buff, size_t sz);
/**
* \brief Get addresss string
*
* \param addr LDMS address
* \param buff String buffer to receive the address string
* \param sz Size of \c buff
*
* \return \c buff on success; otherwise, NULL is returned.
*/
const char *ldms_addr_ntop(struct ldms_addr *addr, char *buff, size_t sz);

/**
* \brief Convert a CIDR IP address string to \c ldms_addr
Expand Down
5 changes: 0 additions & 5 deletions ldms/src/core/ldms_rail.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,6 @@ int sockaddr2ldms_addr(struct sockaddr *sa, struct ldms_addr *la);
*/
const char *sockaddr_ntop(struct sockaddr *sa, char *buff, size_t sz);

/**
* Wrapper of 'inet_ntop()' for ldms_addr.
*/
const char *ldms_addr_ntop(struct ldms_addr *addr, char *buff, size_t sz);

void __rail_ep_quota_return(struct ldms_rail_ep_s *rep, int quota);

int __rep_flush_sbuf_tq(struct ldms_rail_ep_s *rep);
Expand Down

0 comments on commit 8f1564e

Please sign in to comment.