Socket Communication on Specified Network Interface in Linux

In many devices running Linux, there are multiple network interfaces. How can we ensure that our program’s Socket communication is only effective on a specified network interface?We can bind the Socket to the desired network interface (e.g., eth1, modify as needed) using the following code: #define INTERFAXENAME "eth1" struct ifreq interface;strncpy(interface.ifr_ifrn.ifrn_name, INTERFAXENAME, sizeof(INTERFAXENAME));if (setsockopt(sock, SOL_SOCKET, … Read more

TCP Has Been Abandoned by HTTP/3!

TCP Has Been Abandoned by HTTP/3!

Source: Xiaolin Coding Author: Xiaolin Coding From HTTP/1.1 to HTTP/2, the HTTP protocol has always used TCP as its transport protocol. However, in the latest HTTP/3, TCP has been completely abandoned, reaching out to the isolated and helpless UDP, and based on the UDP protocol, a reliable transport protocol has been implemented at the application … Read more

CoAP: The ‘Lightweight Agent’ of the IoT, Tackling Big Challenges with Minimal Size

CoAP: The 'Lightweight Agent' of the IoT, Tackling Big Challenges with Minimal Size

🤔 Introduction: When IoT Devices Start ‘Dieting’… Imagine your smart light bulbs, temperature and humidity sensors, and door locks collectively protesting: “HTTP is too bulky! MQTT is too complex! We need a protocol that can fit into a bikini!” Thus, CoAP (Constrained Application Protocol) makes its grand entrance—it dances the ‘minimalist dance’ on resource-constrained devices … Read more

Introduction to Python: Network Programming

Introduction to Python: Network Programming

Python provides two levels of network services: low-level Socket and high-level SocketServer. These services assist developers in network communication and simplify server-side development. What is a Socket? Socket is an endpoint for communication between applications, primarily used for data exchange over a network. It is an interface provided by the operating system that allows applications … Read more

Understanding TCP/UDP, HTTP/HTTPS: What Are They?

Understanding TCP/UDP, HTTP/HTTPS: What Are They?

(Starting with a diagram, the content relies on compilation)IntroductionRecently, while testing software for internal network penetration, I encountered many protocols that I do not specialize in and could not understand. I gathered relevant information to educate myself.Here’s a summary diagram Application Layer Protocols Application layer protocols are those that directly serve user applications in network … Read more

TCP and UDP in the Internet of Things: Choosing the Right Protocol

TCP and UDP in the Internet of Things: Choosing the Right Protocol

In the context of the Internet of Things (IoT), the choice between TCP and UDP depends on the specific application requirements for reliability, latency, bandwidth, and device resources. Below is a detailed analysis of typical application scenarios, advantages and disadvantages, and selection recommendations for both protocols in IoT: 1. Application Scenarios of TCP in IoT … Read more

OpenWrt Application Filtering Feature Library Update (August)

OpenWrt Application Filtering Feature Library Update (August)

In the past few days, we have tested the applications reported by users in August and extracted feature codes. The feature library has been published on the official website.The main updates are as follows:1. Cloud View TV (fixed)2. Mi Game Center (new)3. Fan Hua Theater (new)4. 233 Paradise Game (new)5. Peak Speed (new)6. WiFi Master … Read more

HTTP 3.0 Completely Abandons TCP: What Went Wrong with TCP?

HTTP 3.0 Completely Abandons TCP: What Went Wrong with TCP?

Source: Reprinted with permission from Hollis (ID: hollischuang) Author: Hollis Since HTTP/1.0 and up to HTTP/2, regardless of how the application layer protocols have improved, TCP has always been the foundation of the HTTP protocol, primarily because it provides a reliable connection. However, starting with HTTP 3.0, this situation has changed. Because, in the newly … Read more

ESP32-S3 Wi-Fi UDP Communication

ESP32-S3 Wi-Fi UDP Communication

“This article introduces the Wi-Fi UDP communication of the ESP32-S3. It is based on a dual-core processor, supports relevant protocols, and implements UDP transmission through the lwIP protocol stack. The article explains the working principle and process, provides program design code, and demonstrates test results, highlighting its application in scenarios such as the Internet of … Read more