Lines Matching +full:tx +full:- +full:checksum +full:- +full:offload

4  * SPDX-License-Identifier: Apache-2.0
280 /** Mutex locking on TX data path disabled on the interface. */
284 /* Total number of flags - must be at the end of the enum */
348 * "DESYNC_FACTOR is a random value within the range 0 - MAX_DESYNC_FACTOR.
469 /** IPv4 time-to-live */
472 /** IPv4 time-to-live for multicast packets */
614 /** Fifo for handling this Tx or Rx packet */
663 /** TCP/IP Offload functions.
664 * If non-NULL, then the TCP/IP stack is located
668 struct net_offload *offload; member
676 * If non-NULL, the interface is considered offloaded at socket level.
743 (void)k_mutex_lock(&iface->lock, K_FOREVER); in net_if_lock()
750 k_mutex_unlock(&iface->lock); in net_if_unlock()
764 (void)k_mutex_lock(&iface->tx_lock, K_FOREVER); in net_if_tx_lock()
775 k_mutex_unlock(&iface->tx_lock); in net_if_tx_unlock()
789 if (iface == NULL || iface->if_dev == NULL) { in net_if_flag_set()
793 atomic_set_bit(iface->if_dev->flags, value); in net_if_flag_set()
807 if (iface == NULL || iface->if_dev == NULL) { in net_if_flag_test_and_set()
811 return atomic_test_and_set_bit(iface->if_dev->flags, value); in net_if_flag_test_and_set()
823 if (iface == NULL || iface->if_dev == NULL) { in net_if_flag_clear()
827 atomic_clear_bit(iface->if_dev->flags, value); in net_if_flag_clear()
841 if (iface == NULL || iface->if_dev == NULL) { in net_if_flag_test_and_clear()
845 return atomic_test_and_clear_bit(iface->if_dev->flags, value); in net_if_flag_test_and_clear()
859 if (iface == NULL || iface->if_dev == NULL) { in net_if_flag_is_set()
863 return atomic_test_bit(iface->if_dev->flags, value); in net_if_flag_is_set()
877 if (iface == NULL || iface->if_dev == NULL) { in net_if_oper_state_set()
881 BUILD_ASSERT((enum net_if_oper_state)(-1) > 0 && NET_IF_OPER_UNKNOWN == 0); in net_if_oper_state_set()
883 iface->if_dev->oper_state = oper_state; in net_if_oper_state_set()
886 return iface->if_dev->oper_state; in net_if_oper_state_set()
898 if (iface == NULL || iface->if_dev == NULL) { in net_if_oper_state()
902 return iface->if_dev->oper_state; in net_if_oper_state()
924 if (iface == NULL || iface->if_dev == NULL) { in net_if_l2()
928 return iface->if_dev->l2; in net_if_l2()
950 if (iface == NULL || iface->if_dev == NULL) { in net_if_l2_data()
954 return iface->if_dev->l2_data; in net_if_l2_data()
966 if (iface == NULL || iface->if_dev == NULL) { in net_if_get_device()
970 return iface->if_dev->dev; in net_if_get_device()
974 * @brief Queue a packet to the net interface TX queue
982 * @brief Return the IP offload status
991 return (iface != NULL && iface->if_dev != NULL && in net_if_is_ip_offloaded()
992 iface->if_dev->offload != NULL); in net_if_is_ip_offloaded()
1001 * @brief Return offload status of a given network interface.
1010 * @brief Return the IP offload plugin
1014 * @return NULL if there is no offload plugin defined, valid pointer otherwise
1019 if (iface == NULL || iface->if_dev == NULL) { in net_if_offload()
1023 return iface->if_dev->offload; in net_if_offload()
1032 * @brief Return the socket offload status
1041 if (iface == NULL || iface->if_dev == NULL) { in net_if_is_socket_offloaded()
1045 return (iface->if_dev->socket_offload != NULL); in net_if_is_socket_offloaded()
1063 if (iface == NULL || iface->if_dev == NULL) { in net_if_socket_offload_set()
1067 iface->if_dev->socket_offload = socket_offload; in net_if_socket_offload_set()
1084 if (iface == NULL || iface->if_dev == NULL) { in net_if_socket_offload()
1088 return iface->if_dev->socket_offload; in net_if_socket_offload()
1105 if (iface == NULL || iface->if_dev == NULL) { in net_if_get_link_addr()
1109 return &iface->if_dev->link_addr; in net_if_get_link_addr()
1125 return &iface->config; in net_if_get_config()
1167 * This function is intended for upper-layer protocols to inform the IPv6
1194 return -EPERM; in net_if_set_link_addr_unlocked()
1197 net_if_get_link_addr(iface)->addr = addr; in net_if_set_link_addr_unlocked()
1198 net_if_get_link_addr(iface)->len = len; in net_if_set_link_addr_unlocked()
1199 net_if_get_link_addr(iface)->type = type; in net_if_set_link_addr_unlocked()
1267 if (iface == NULL || iface->if_dev == NULL) { in net_if_get_mtu()
1271 return iface->if_dev->mtu; in net_if_get_mtu()
1283 if (iface == NULL || iface->if_dev == NULL) { in net_if_set_mtu()
1287 iface->if_dev->mtu = mtu; in net_if_set_mtu()
1303 ifaddr->is_infinite = is_infinite; in net_if_addr_set_lf()
1337 return &iface->config; in net_if_config_get()
1523 * @param cb User-supplied callback function to call
1567 * @param cb User-supplied callback function to call
1670 return addr->is_joined; in net_if_ipv6_maddr_is_joined()
1742 prefix->is_infinite = is_infinite; in net_if_ipv6_prefix_set_lf()
1786 return &router->address.in6_addr; in net_if_router_ipv6()
1955 if (!iface->config.ip.ipv6) { in net_if_ipv6_set_base_reachable_time()
1959 iface->config.ip.ipv6->base_reachable_time = reachable_time; in net_if_ipv6_set_base_reachable_time()
1981 if (!iface->config.ip.ipv6) { in net_if_ipv6_get_reachable_time()
1985 return iface->config.ip.ipv6->reachable_time; in net_if_ipv6_get_reachable_time()
2014 ipv6->reachable_time = net_if_ipv6_calc_reachable_time(ipv6); in net_if_ipv6_set_reachable_time()
2034 if (!iface->config.ip.ipv6) { in net_if_ipv6_set_retrans_timer()
2038 iface->config.ip.ipv6->retrans_timer = retrans_timer; in net_if_ipv6_set_retrans_timer()
2059 if (!iface->config.ip.ipv6) { in net_if_ipv6_get_retrans_timer()
2063 return iface->config.ip.ipv6->retrans_timer; in net_if_ipv6_get_retrans_timer()
2215 * @brief Get IPv4 time-to-live value specified for a given interface
2219 * @return Time-to-live
2224 * @brief Set IPv4 time-to-live value specified to a given interface
2227 * @param ttl Time-to-live value
2232 * @brief Get IPv4 multicast time-to-live value specified for a given interface
2236 * @return Time-to-live
2241 * @brief Set IPv4 multicast time-to-live value specified to a given interface
2244 * @param ttl Time-to-live value
2325 * @param cb User-supplied callback function to call
2357 * @param cb User-supplied callback function to call
2398 return addr->is_joined; in net_if_ipv4_maddr_is_joined()
2423 return &router->address.in_addr; in net_if_router_ipv4()
2743 /* used to ensure encoding of checksum support in net_if.h and
2759 * @brief Type of checksum for which support in the interface will be queried.
2762 /** Interface supports IP version 4 header checksum calculation */
2764 /** Interface supports checksum calculation for TCP payload in IPv4 */
2767 /** Interface supports checksum calculation for UDP payload in IPv4 */
2770 /** Interface supports checksum calculation for ICMP4 payload in IPv4 */
2772 /** Interface supports IP version 6 header checksum calculation */
2774 /** Interface supports checksum calculation for TCP payload in IPv6 */
2777 /** Interface supports checksum calculation for UDP payload in IPv6 */
2780 /** Interface supports checksum calculation for ICMP6 payload in IPv6 */
2785 * @brief Check if received network packet checksum calculation can be avoided
2787 * in which case the IP stack does not need to calculate the checksum.
2790 * @param chksum_type L3 and/or L4 protocol for which to compute checksum
2792 * @return True if checksum needs to be calculated, false otherwise.
2798 * @brief Check if network packet checksum calculation can be avoided or not
2801 * checksum.
2804 * @param chksum_type L3 and/or L4 protocol for which to compute checksum
2806 * @return True if checksum needs to be calculated, false otherwise.
2845 * @param cb User-supplied callback function to call
2940 * (for example Wi-Fi network association).
3041 * @brief Add timestamped TX buffer to be handled
3064 return -ENOTSUP; in net_if_set_promisc()
3102 * @brief Check if there are any pending TX network data for a given network
3107 * @return True if there are pending TX network packets for this network
3113 return !!iface->tx_pending; in net_if_are_pending_tx_packets()
3127 * @return 0 on success, or -EALREADY/-EBUSY as possible errors.
3136 * @return 0 on success, or -EALREADY as a possible error.
3151 * @brief Check if the network interface supports Wi-Fi.
3155 * @return True if interface supports Wi-Fi, False otherwise.
3160 * @brief Get first Wi-Fi network interface.
3167 * @brief Get Wi-Fi network station interface.
3174 * @brief Get first Wi-Fi network Soft-AP interface.
3190 * -EINVAL if invalid parameters,
3191 * -ERANGE if name cannot be copied to the user supplied buffer,
3192 * -ENOTSUP if interface name support is disabled,
3206 * -ENOTSUP interface name support is disabled
3207 * -EINVAL if invalid parameters are given,
3208 * -ENAMETOOLONG if name is too long
3274 [0 ... (_num_configs - 1)] = { \
3300 [0 ... (NET_IF_MAX_CONFIGS - 1)] = { \
3545 *(_dst) = ((uintptr_t)_net_if_list_end - \