3 * Copyright (c) 2020 Project CHIP Authors
4 * Copyright (c) 2013-2017 Nest Labs, Inc.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 * This file enumerates and defines the different types of events
22 * generated at the Inet layer.
28 #include <inet/InetConfig.h>
30 #include <system/SystemEvent.h>
32 #if CHIP_SYSTEM_CONFIG_USE_LWIP
38 * The Inet layer event type definitions.
43 kInetEvent_TCPConnectComplete = _INET_CONFIG_EVENT(0), /**< The event for TCP connection completion */
44 kInetEvent_TCPConnectionReceived = _INET_CONFIG_EVENT(1), /**< The event for TCP connection reception */
45 kInetEvent_TCPDataReceived = _INET_CONFIG_EVENT(2), /**< The event for data reception over a TCP connection */
46 kInetEvent_TCPDataSent = _INET_CONFIG_EVENT(3), /**< The event for data transmission over a TCP connection */
47 kInetEvent_TCPError = _INET_CONFIG_EVENT(4), /**< The event for an error on a TCP connection */
48 kInetEvent_UDPDataReceived = _INET_CONFIG_EVENT(5), /**< The event for data reception over UDP */
49 kInetEvent_DNSResolveComplete = _INET_CONFIG_EVENT(6), /**< The event for DNS name resolution completion */
50 kInetEvent_RawDataReceived = _INET_CONFIG_EVENT(7) /**< The event for data reception over an InetLayer raw endpoint */
54 * Check to verify if a System::EventType is a valid Inet layer event type.
56 * @param[in] aType A chip System Layer event type.
58 * @return true if it falls within the enumerated range; otherwise, false.
61 static inline bool INET_IsInetEvent(chip::System::EventType aType)
63 return (aType >= kInetEvent_TCPConnectComplete && aType <= kInetEvent_RawDataReceived);
69 #endif // CHIP_SYSTEM_CONFIG_USE_LWIP