Add a more flexible version of hwaddr_aton: hwaddr_aton2()
This version of the MAC address parser allows number of different string formats for the address (e.g., 00:11:22:33:44:55, 0011.2233.4455, 001122334455, 00-11-22-33-44-55). It returns the number of characters used from the input string in case of success.
This commit is contained in:
parent
81a658d754
commit
448a0a19d7
2 changed files with 32 additions and 1 deletions
|
@ -436,6 +436,7 @@ typedef u64 __bitwise le64;
|
|||
#endif /* __must_check */
|
||||
|
||||
int hwaddr_aton(const char *txt, u8 *addr);
|
||||
int hwaddr_aton2(const char *txt, u8 *addr);
|
||||
int hexstr2bin(const char *hex, u8 *buf, size_t len);
|
||||
void inc_byte_array(u8 *counter, size_t len);
|
||||
void wpa_get_ntp_timestamp(u8 *buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue