@@ -205,10 +205,20 @@ * @param address The address on which to set the port * @param port The port to set on the address */ extern void of_socket_address_set_port(of_socket_address_t *_Nonnull address, uint16_t port); + +/*! + * @brief Returns the port of the specified of_socket_address_t, independent of + * the address family used. + * + * @param address The address on which to get the port + * @return The port of the address + */ +extern uint16_t of_socket_address_get_port( + const of_socket_address_t *_Nonnull address); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END