mirror of
https://github.com/pumpitupdev/pumptools.git
synced 2026-10-08 22:49:59 +03:00
Version 1.08 with public source code release.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#ifndef UTIL_NET_H
|
||||
#define UTIL_NET_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* Split an ipv4 string (e.g. 127.0.0.1:22 or just 127.0.0.1) into address and port
|
||||
*
|
||||
* @param str String to split
|
||||
* @param address Address part (must be free'd by caller)
|
||||
* @param port Port part (or -1 if it doesn't exist)
|
||||
* @return True if successful, false on format error
|
||||
*/
|
||||
bool util_net_split_ipv4_str(const char* str, char** address, uint16_t* port);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user