@@ -31,46 +31,46 @@ namespace mbed_cellular_util {
31
31
32
32
static const char hex_values[] = " 0123456789ABCDEF" ;
33
33
34
- /* * Converts the given ip address to proper IPv6 address if needed.
34
+ /* * Converts the given IP address to proper IPv6 address if needed.
35
35
* Conversion is done only if it's NOT IPv4 and separated with colons.
36
36
* AT command +CGPADDR can give IP address in format of a1.a2.a3.a4.a5.a6.a7.a8.a9.a10.a11.a12.a13.a14.a15.a16 for IPv6
37
- * where ax are in decimal format. In this case function converts decimals to hex with separated with colons.
37
+ * where ax are in decimal format. In this case, function converts decimals to hex with separated with colons.
38
38
*
39
- * @param ip ip address which can be IPv4 or IPv6 in different formats from AT command +CGPADDR. Converted result uses same buffer.
39
+ * @param ip IP address that can be IPv4 or IPv6 in different formats from AT command +CGPADDR. Converted result uses same buffer.
40
40
*/
41
41
void convert_ipv6 (char * ip);
42
42
43
- /* * Separates ip addresses from the given 'orig' string. 'orig' may contain zero, one or two ip addresses in various formats.
44
- * See AT command +CGPIAF from 3GPP TS 27.007 for details. Does also needed conversions for ipv6 addresses.
43
+ /* * Separates IP addresses from the given 'orig' string. 'orig' may contain zero, one or two IP addresses in various formats.
44
+ * See AT command +CGPIAF from 3GPP TS 27.007 for details. Does also needed conversions for IPv6 addresses.
45
45
*
46
- * @param orig original string which contains zero, one or two ip addressees in various formats
47
- * @param ip preallocated buffer which might contain ip address after return
48
- * @param ip_size size of preallocated buffer ip
49
- * @param ip2 preallocated buffer which might contain ip address after return
46
+ * @param orig original string that contains zero, one or two IP addressees in various formats
47
+ * @param ip preallocated buffer that might contain IP address after return
48
+ * @param ip_size size of preallocated buffer IP
49
+ * @param ip2 preallocated buffer that might contain IP address after return
50
50
* @param ip2_size size of preallocated buffer ip2
51
51
*
52
52
*/
53
53
void separate_ip_addresses (char * orig, char * ip, size_t ip_size, char * ip2, size_t ip2_size);
54
54
55
- /* * Swaps the arrays if param ip does not contain ipv6 address but param ip2 does.
55
+ /* * Swaps the arrays if param IP does not contain IPv6 address but param ip2 does.
56
56
*
57
- * @param ip ip address
57
+ * @param ip IP address
58
58
* @param ip_size size of buffer ip
59
- * @param ip2 ip address
59
+ * @param ip2 IP address
60
60
* @param ip2_size size of buffer ip2
61
61
*/
62
62
void prefer_ipv6 (char * ip, size_t ip_size, char * ip2, size_t ip2_size);
63
63
64
64
/* * Converts the given int to two hex characters
65
65
*
66
66
* @param num number to be converted to hex string
67
- * @param buf preallocated buffer which will contain 2 char length hex value
67
+ * @param buf preallocated buffer that will contain 2 char length hex value
68
68
*/
69
69
void int_to_hex_str (uint8_t num, char * buf);
70
70
71
71
/* * Converts the given buffer 'str' to hex buffer 'buf. First 'len' char's are converted to two hex bytes.
72
72
*
73
- * @param str char buffer which is to be converted to hex
73
+ * @param str char buffer that is to be converted to hex
74
74
* @param len how many chars from str are to be converted
75
75
* @param buf destination buffer for hex converted chars. Buffer should be double the size of str to fit hex-encoded string.
76
76
* @param omit_leading_zero if true then possible leading zeroes are omitted
@@ -87,7 +87,7 @@ int hex_str_to_int(const char *hex_string, int hex_string_length);
87
87
88
88
/* * Converts the given hex string str to char string to buf
89
89
*
90
- * @param str hex string which is converted to char string to buf
90
+ * @param str hex string that is converted to char string to buf
91
91
* @param len length of the param str/how many hex are converted
92
92
* @param buf preallocated buffer where result conversion is stored
93
93
* @return length of the buf
0 commit comments