Characteristics of the UDP protocol

The UDP protocol (User Datagram Protocol) is a connectionless orientated protocol of the transport layer of the TCP/IP model. This protocol is very simple given that it does not provide error detection (it is not connection orientated...).

The UDP segment header is therefore very simple:

Source port
(16 bits):
Destination port
(16 bits):
Total length 
(16 bits)
Header checksum 
(16 bits)
Data 
(variable length)

Meanings of the different fields

    • Source port: this is the port number relating to the originator application of the UDP segment. This field represents a response address for the recipient. So, this field is optional, which means that if the source port is not specified the 16 bits of this field will be set to zero, in which case the recipient will not be able to respond (this is not strictly necessary, in particular for one way messages).
    • Destination port: This field contains the port corresponding to the application on the recipient machine to which it is sent.
    • Length: This field specifies the total length of the segment, header included, however, the header has a length of 4 x 16 bits (which is 8x8 bits) so the field length is necessarily greater than or equal to 8 bytes.
    • Checksum: This is a checksum conducted in such a way as to be able to check the integrity of the segment.

UDP protocol的更多相关文章

  1. 给Hi3518e的Uboot添加UDP广播收发功能

    基于个人兴趣,决定实现一个和方案公司提供的uboot收发广播的功能.记录笔记如下. SDK版本:Hi3518E_V100R001C01SPC081 1. 由于我手头的板子的Phy是RMII模式,因此先 ...

  2. twisted udp编程

    概述 Unlike TCP, UDP has no notion of connections. A UDP socket can receive datagrams from any server ...

  3. TCP和UDP的9个区别是什么

    TCP和UDP是两个传输层协议,广泛应用于网络中不同主机之间传输数据.对任何程序员来说,熟悉TCP和UDP的工作方式都是至关重要的.这就是为什么TCP和UDP是一个流行的Java编程面试问题.我曾经在 ...

  4. Java中UDP协议的基本原理和简单用法

    UDP协议是非面向连接的,相对于TCP协议效率较高,但是不安全.UDP协议类似发信息的过程,不管接收方是在线还是关机状态,都会把信息发送出去.但是如果接收方不处于接收信息的状态,发送出去的数据包就会丢 ...

  5. Internet protocol optimizer

    A method for optimizing the throughput of TCP/IP applications by aggregating user application data a ...

  6. Fedora 24中的日志管理

    Introduction Log files are files that contain messages about the system, including the kernel, servi ...

  7. python之网络编程

    本地的进程间通信(IPC)有很多种方式,但可以总结为下面4类: 消息传递(管道.FIFO.消息队列) 同步(互斥量.条件变量.读写锁.文件和写记录锁.信号量) 共享内存(匿名的和具名的) 远程过程调用 ...

  8. Linux防火墙配置(iptables, firewalld)

    netfilter和底层实现 iptables firealld Linux中的防火墙 RHEL中有几种防火墙共存: iptables firewalld ip6tables ebtables 这些软 ...

  9. Kerberos简介及常见问题

    基本描述 Kerberos使用Needha-Schroeder协议作为它的基础.它使用了一个由两个独立的逻辑部分:认证服务器和票据授权服务器组成的"可信赖的第三方",术语称为密钥分 ...

随机推荐

  1. MySQL 多实例启动和关闭脚本

    DB: 5.5.14 OS:CentOS 6.3 在MySQL多实例中,一个一个启动灰常麻烦,因此写个简单的启动和关闭脚本 启动脚本:start.sh #!/bin/bash for port in ...

  2. windows鼠标消息处理与键盘模拟函数

    1.鼠标坐标问题 BOOL GetWindowRect(   HWND hWnd,   LPRECT lpRect  ); RECT x;//定义一个二维数组x ::GetWindowRect(hwn ...

  3. 论坛类应用双Tableview翻页效果实现

    作为一名篮球爱好者,经常使用虎扑体育,虎扑体育应用最核心的部分就是其论坛功能,无论哪个版块,论坛都是其核心,而其论坛部分的实现又别具一格,它以两个tableview的形式翻页滚动显示,而不是常见的那种 ...

  4. Learn know more about big data

    As we all know,we are in a big data age now."Every sword has two slides",as a ITer,we shou ...

  5. ELF

    http://www.360doc.com/content/11/0826/13/7588214_143424472.shtml 链接,装载都是基于数据结构ELF.

  6. BZOJ 4302 Buildings 解题报告

    这个题好像很有趣的样子. 题目分析: 房间都是 $1\times k$ 的,也就是一条一条的.这个好像比较显然的样子. 一个房间如果要覆盖某个格子$u$,那么这个房间的面积至少为 $dis(u, Bo ...

  7. oracle将两个结果连接后进行查询,得到两个查询的联合结果

    一.需求 用户答题,共3道,必须3题都答完才能提交. 目的:要查询用户答对了几题,答错了几题.(当然此处可以只查答对的题目数,用3减即得答错题的题目数) 二.sql select * ) rightC ...

  8. 2014 Multi-University Training Contest 10

    官方解题报告:http://blog.sina.com.cn/s/blog_6bddecdc0102v01l.html A simple brute force problem. http://acm ...

  9. PHP中如何给日期加上一个月 加一周 加一天

    echo   date("Y-m-d",strtotime("+1 month",strtotime("2012-02-04"))); 结果 ...

  10. UVALive 6525

    二分图最大匹配 #include<cstdio> #include<iostream> #include<cstring> #define MAX 10010 us ...