diff --git a/sys/net/gnrc/application_layer/tftp/gnrc_tftp.c b/sys/net/gnrc/application_layer/tftp/gnrc_tftp.c index baa3a5c9fbaad1811f3b37a84d0b35b03af2b79f..ab4d7f28481e50b7fe479e1dd3d2445fa9b28b37 100644 --- a/sys/net/gnrc/application_layer/tftp/gnrc_tftp.c +++ b/sys/net/gnrc/application_layer/tftp/gnrc_tftp.c @@ -598,10 +598,10 @@ tftp_state _tftp_state_processes(tftp_context_t *ctxt, msg_t *m) gnrc_pktsnip_t *pkt = (gnrc_pktsnip_t *)(m->content.ptr); gnrc_pktsnip_t *tmp; - LL_SEARCH_SCALAR(pkt, tmp, type, GNRC_NETTYPE_UDP); + tmp = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_UDP); udp_hdr_t *udp = (udp_hdr_t *)tmp->data; - LL_SEARCH_SCALAR(pkt, tmp, type, GNRC_NETTYPE_IPV6); + tmp = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_IPV6); ipv6_hdr_t *ip = (ipv6_hdr_t *)tmp->data; uint8_t *data = (uint8_t *)pkt->data; diff --git a/sys/net/gnrc/conn/gnrc_conn.c b/sys/net/gnrc/conn/gnrc_conn.c index 80fe1c9481b3e6b12e70c88ccbe8422601ea98a9..0675020671b70aff53f3fc1533f1c139ba74f922 100644 --- a/sys/net/gnrc/conn/gnrc_conn.c +++ b/sys/net/gnrc/conn/gnrc_conn.c @@ -36,7 +36,7 @@ int gnrc_conn_recvfrom(conn_t *conn, void *data, size_t max_len, void *addr, siz if (pkt->size > max_len) { return -ENOMEM; } - LL_SEARCH_SCALAR(pkt, l3hdr, type, conn->l3_type); + l3hdr = gnrc_pktsnip_search_type(pkt, conn->l3_type); if (l3hdr == NULL) { msg_send_to_self(&msg); /* requeue invalid messages */ continue; @@ -44,7 +44,7 @@ int gnrc_conn_recvfrom(conn_t *conn, void *data, size_t max_len, void *addr, siz #if defined(MODULE_CONN_UDP) || defined(MODULE_CONN_TCP) if ((conn->l4_type != GNRC_NETTYPE_UNDEF) && (port != NULL)) { gnrc_pktsnip_t *l4hdr; - LL_SEARCH_SCALAR(pkt, l4hdr, type, conn->l4_type); + l4hdr = gnrc_pktsnip_search_type(pkt, conn->l4_type); if (l4hdr == NULL) { msg_send_to_self(&msg); /* requeue invalid messages */ continue; diff --git a/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c b/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c index c2d70fc0219a52caf25f66dd0677b8ca8857b028..be37f316aebce32c317452a7adf4ffac563dd073 100644 --- a/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c +++ b/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c @@ -59,13 +59,13 @@ void gnrc_icmpv6_demux(kernel_pid_t iface, gnrc_pktsnip_t *pkt) icmpv6_hdr_t *hdr; gnrc_netreg_entry_t *sendto; - LL_SEARCH_SCALAR(pkt, icmpv6, type, GNRC_NETTYPE_ICMPV6); + icmpv6 = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_ICMPV6); assert(icmpv6 != NULL); /* there can be extension headers between IPv6 and ICMPv6 header so we have * to search it */ - LL_SEARCH_SCALAR(icmpv6, ipv6, type, GNRC_NETTYPE_IPV6); + ipv6 = gnrc_pktsnip_search_type(icmpv6, GNRC_NETTYPE_IPV6); assert(ipv6 != NULL); diff --git a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c index d2062acbcea09aa3dbe6e80e61f77508dea2fc81..4abf0ce8e5e2b497203816df485ca054704b9326 100644 --- a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c +++ b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c @@ -710,7 +710,7 @@ static void _receive(gnrc_pktsnip_t *pkt) assert(pkt != NULL); - LL_SEARCH_SCALAR(pkt, netif, type, GNRC_NETTYPE_NETIF); + netif = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_NETIF); if (netif != NULL) { iface = ((gnrc_netif_hdr_t *)netif->data)->if_pid; diff --git a/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c b/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c index dce7c84303b179256ccbbf8f19d799009896830b..c771beac522929f0441ea48051f008b789e6c2f1 100644 --- a/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c +++ b/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c @@ -275,7 +275,7 @@ void gnrc_ndp_nbr_adv_handle(kernel_pid_t iface, gnrc_pktsnip_t *pkt, #endif } - LL_SEARCH_SCALAR(pkt, netif, type, GNRC_NETTYPE_NETIF); + netif = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_NETIF); if (netif != NULL) { netif_hdr = netif->data; diff --git a/sys/net/gnrc/network_layer/ndp/node/gnrc_ndp_node.c b/sys/net/gnrc/network_layer/ndp/node/gnrc_ndp_node.c index 5ed0b8c78c63380a29da80b9e811f5c08d166712..facab339eb3f88082314970f2e329536fea58d32 100644 --- a/sys/net/gnrc/network_layer/ndp/node/gnrc_ndp_node.c +++ b/sys/net/gnrc/network_layer/ndp/node/gnrc_ndp_node.c @@ -66,7 +66,7 @@ kernel_pid_t gnrc_ndp_node_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_len, #ifdef MODULE_GNRC_IPV6_EXT_RH ipv6_hdr_t *hdr; gnrc_pktsnip_t *ipv6; - LL_SEARCH_SCALAR(pkt, ipv6, type, GNRC_NETTYPE_IPV6); + ipv6 = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_IPV6); assert(ipv6); hdr = ipv6->data; next_hop_ip = ipv6_ext_rh_next_hop(hdr); diff --git a/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c b/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c index 31cf7b80e0e4fb679a0cdeee131dff9d76e78237..b1f9ebe676cca764e67754959db95f80bfffe1b7 100644 --- a/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c +++ b/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c @@ -84,7 +84,7 @@ static void _receive(gnrc_pktsnip_t *pkt) pkt = payload; /* reset pkt from temporary variable */ - LL_SEARCH_SCALAR(pkt, payload, type, GNRC_NETTYPE_SIXLOWPAN); + payload = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_SIXLOWPAN); if ((payload == NULL) || (payload->size < 1)) { DEBUG("6lo: Received packet has no 6LoWPAN payload\n"); diff --git a/sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c b/sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c index 6c47b19af0f986999612c056d03f2897769fe3d0..a8653dd1e583b2d4bdfaf9644b237ba86b6e449e 100644 --- a/sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c +++ b/sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c @@ -127,7 +127,7 @@ kernel_pid_t gnrc_sixlowpan_nd_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_ #ifdef MODULE_GNRC_IPV6_EXT_RH ipv6_hdr_t *hdr; gnrc_pktsnip_t *ipv6; - LL_SEARCH_SCALAR(pkt, ipv6, type, GNRC_NETTYPE_IPV6); + ipv6 = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_IPV6); assert(ipv6); hdr = ipv6->data; next_hop = ipv6_ext_rh_next_hop(hdr); diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl.c b/sys/net/gnrc/routing/rpl/gnrc_rpl.c index 0a90ecfba431fed80706de70f8bf1ada7e13643f..eab85ea3fa2984984905a5b6488204ab9db4f986 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl.c @@ -119,7 +119,7 @@ static void _receive(gnrc_pktsnip_t *icmpv6) ipv6_hdr_t *ipv6_hdr = NULL; icmpv6_hdr_t *icmpv6_hdr = NULL; - LL_SEARCH_SCALAR(icmpv6, ipv6, type, GNRC_NETTYPE_IPV6); + ipv6 = gnrc_pktsnip_search_type(icmpv6, GNRC_NETTYPE_IPV6); assert(ipv6 != NULL); diff --git a/sys/net/gnrc/transport_layer/udp/gnrc_udp.c b/sys/net/gnrc/transport_layer/udp/gnrc_udp.c index 261330cb8b38d73c1b52dc6895c0bd9b1c9ec24b..d3b66416ee4a4b5af1811ca2f9ed4c9286c5ef98 100644 --- a/sys/net/gnrc/transport_layer/udp/gnrc_udp.c +++ b/sys/net/gnrc/transport_layer/udp/gnrc_udp.c @@ -105,7 +105,7 @@ static void _receive(gnrc_pktsnip_t *pkt) } pkt = udp; - LL_SEARCH_SCALAR(pkt, ipv6, type, GNRC_NETTYPE_IPV6); + ipv6 = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_IPV6); assert(ipv6 != NULL); diff --git a/sys/shell/commands/sc_icmpv6_echo.c b/sys/shell/commands/sc_icmpv6_echo.c index c418e06396fbaadded107f56ffa7db6433f8d4b8..3d98551dac424225e1c06f23da4823e184b6c83e 100644 --- a/sys/shell/commands/sc_icmpv6_echo.c +++ b/sys/shell/commands/sc_icmpv6_echo.c @@ -86,8 +86,8 @@ int _handle_reply(gnrc_pktsnip_t *pkt, uint32_t time) icmpv6_echo_t *icmpv6_hdr; uint16_t seq; - LL_SEARCH_SCALAR(pkt, ipv6, type, GNRC_NETTYPE_IPV6); - LL_SEARCH_SCALAR(pkt, icmpv6, type, GNRC_NETTYPE_ICMPV6); + ipv6 = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_IPV6); + icmpv6 = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_ICMPV6); if ((ipv6 == NULL) || (icmpv6 == NULL)) { puts("error: IPv6 header or ICMPv6 header not found in reply");