X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink.h;h=404a8fdec9c308db1509aeb3de43e5b340e267ae;hb=42e9341c12c630ebe3a550a4ce813aac4b1b047c;hp=8bc8c706f5a4bff29455f302a8b262c22d5e61d1;hpb=326a86ef927e1f161a6742edfca041a945c7a547;p=meshlink diff --git a/src/meshlink.h b/src/meshlink.h index 8bc8c706..404a8fde 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -100,13 +100,22 @@ struct meshlink_channel { #endif // MESHLINK_INTERNAL_H -// TODO documentation +/// An edge in the meshlink network. struct meshlink_edge { - struct meshlink_node *from; - struct meshlink_node *to; - struct sockaddr_storage address; - uint32_t options; - int weight; + struct meshlink_node *from; ///< Pointer to a node. Node memory is + // owned by meshlink and should not be + // deallocated. Node contents may be + // changed by meshlink. + struct meshlink_node *to; ///< Pointer to a node. Node memory is + // owned by meshlink and should not be + // deallocated. Node contents may be + // changed by meshlink. +#ifdef HAVE_STRUCT_SOCKADDR_STORAGE + struct sockaddr_storage address;///< The address information associated +#endif + // with this edge. + uint32_t options; ///< Edge options. @TODO what are edge options? + int weight; ///< Weight assigned to this edge. }; /// Get the text for the given MeshLink error code.