Skip to content

Commit 5007428

Browse files
committed
lib: pdn: Remove deprecated function
Remove the deprecated pdn_dynamic_params_get function Signed-off-by: Markus Rekdal <[email protected]>
1 parent 5040028 commit 5007428

File tree

3 files changed

+5
-60
lines changed

3 files changed

+5
-60
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,11 @@ Modem libraries
743743
* An issue where wrong APN rate control event was sent.
744744
* An issue where a malformed +CGEV notification was not handled correctly.
745745

746+
* Removed:
747+
748+
* The deprecated :c:func:`pdn_dynamic_params_get` function.
749+
Use the :c:func:`pdn_dynamic_info_get` function instead.
750+
746751
Multiprotocol Service Layer libraries
747752
-------------------------------------
748753

include/modem/pdn.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -220,21 +220,6 @@ int pdn_deactivate(uint8_t cid);
220220
*/
221221
int pdn_id_get(uint8_t cid);
222222

223-
/**
224-
* @brief Retrieve dynamic parameters of a given PDN connection.
225-
*
226-
* @deprecated Use #pdn_dynamic_info_get instead.
227-
*
228-
* @param cid The PDP context ID.
229-
* @param[out] dns4_pri The address of the primary IPv4 DNS server. Optional, can be NULL.
230-
* @param[out] dns4_sec The address of the secondary IPv4 DNS server. Optional, can be NULL.
231-
* @param[out] ipv4_mtu The IPv4 MTU. Optional, can be NULL.
232-
*
233-
* @return Zero on success or an error code on failure.
234-
*/
235-
__deprecated int pdn_dynamic_params_get(uint8_t cid, struct in_addr *dns4_pri,
236-
struct in_addr *dns4_sec, unsigned int *ipv4_mtu);
237-
238223
/**
239224
* @brief Retrieve dynamic parameters of a given PDN connection.
240225
*

lib/pdn/pdn.c

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -635,51 +635,6 @@ int pdn_id_get(uint8_t cid)
635635
return strtoul(p + 1, NULL, 10);
636636
}
637637

638-
int pdn_dynamic_params_get(uint8_t cid, struct in_addr *dns4_pri,
639-
struct in_addr *dns4_sec, unsigned int *ipv4_mtu)
640-
{
641-
int matched;
642-
const char *fmt;
643-
unsigned int mtu;
644-
char dns4_pri_str[INET_ADDRSTRLEN];
645-
char dns4_sec_str[INET_ADDRSTRLEN];
646-
char at_cmd[sizeof("AT+CGCONTRDP=###")];
647-
648-
if (snprintf(at_cmd, sizeof(at_cmd), AT_CMD_PDN_CONTEXT_READ_INFO, cid) >= sizeof(at_cmd)) {
649-
return -E2BIG;
650-
}
651-
652-
fmt = AT_CMD_PDN_CONTEXT_READ_INFO_PARSE_LINE1;
653-
654-
/* If IPv4 is enabled, it will be the first response line. */
655-
matched = nrf_modem_at_scanf(at_cmd, fmt, &dns4_pri_str, &dns4_sec_str, &mtu);
656-
/* Need to match at least the two IP addresses, or there is an error */
657-
if (matched < 2) {
658-
return -EBADMSG;
659-
}
660-
661-
if (dns4_pri) {
662-
if (zsock_inet_pton(AF_INET, dns4_pri_str, dns4_pri) != 1) {
663-
return -EADDRNOTAVAIL;
664-
}
665-
}
666-
if (dns4_sec) {
667-
if (zsock_inet_pton(AF_INET, dns4_sec_str, dns4_sec) != 1) {
668-
return -EADDRNOTAVAIL;
669-
}
670-
}
671-
if (ipv4_mtu) {
672-
/* If we matched the MTU, copy it here, otherwise report zero */
673-
if (matched == 3) {
674-
*ipv4_mtu = mtu;
675-
} else {
676-
*ipv4_mtu = 0;
677-
}
678-
}
679-
680-
return 0;
681-
}
682-
683638
static int pdn_sa_family_from_ip_string(const char *src)
684639
{
685640
char buf[INET6_ADDRSTRLEN];

0 commit comments

Comments
 (0)