Null / Loopback (Null)

参考:

http://www.cnblogs.com/caoguoping100/p/3654452.html

https://wiki.wireshark.org/NullLoopback

抓包安装 Terminal终端,输入命令。

tcpdump -i pdp_ip0 -s 0 -w pdp.pcap 获取的报文,发现存在Loopback 。

pdp_ip0 是3G/4G下的网卡,获取的报文直接loopback层。不解?

附wireshark解析

Null / Loopback (Null)

The "null" protocol is the link-layer protocol used on the loopback device on most BSD operating systems. It is somewhat misnamed, in that the link-layer header isn‘t "null" in the sense that there isn‘t any link-layer header; instead, the link-layer header is a 4-byte integer, in the native byte order of the machine on which the traffic is captured, containing an "address family"/"protocol family" value for the protocol running atop the link layer, for example AF_INET for IPv4 and AF_INET6 for IPv6. AF_INET is 2 on all BSD-based operating systems, as it was introduced at the same time the BSD versions with networking were released; however, AF_INET6, unfortunately, has different values in {NetBSD,OpenBSD,BSD/OS}, {FreeBSD,DragonFlyBSD}, and {Darwin/Mac OS X}, so an IPv6 packet might have a link-layer header with 24, 28, or 30 as the AF_ value.

The byte order is that of the host on which the packet was captured, so the dissector has to be able to handle both big-endian and little-endian values.

The "loopback" protocol is used by recent versions of OpenBSD; it‘s the same as the "null" protocol, except that the 4-byte AF_ value is in network byte order (big-endian) rather than host byte order.

History

The "null" protocol dates back to the original BPF implementation on BSD.

Protocol dependencies

The "null" and "loopback" protocols are the lowest software layers, so they only depend on the implementation of the loopback device.

Example traffic

时间: 2024-08-03 15:27:29

Null / Loopback (Null)的相关文章

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Soluti

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* reConstructBinaryTree(vector<int> pre,vector<in

对”唯一键可以包含NULL值,并且每个NULL值都是唯一的(即NULL!=NULL)“理解

因为最近在写一篇关于字符串模糊检索的论文,开始比较细致的研究数据库(MySQL)中的index问题,变到图书馆借了本<Effective MySQL之SQL语句最优化>(Ronald Bradford著,李雪峰译).今天在里面看到了这句”唯一键可以包含NULL值,并且每个NULL值都是唯一的(即NULL!=NULL)“.第一反应是:我去,什么鬼?简直不是人话啊!!其实计算机行业好多这种话,想了想然后便到网上查找了写资料! 使用WHERE子句的SQL SELECT命令来从MySQL表获取数据.但

java.lang.UnsupportedOperationException:This parser does not support specification &quot;null&quot; version &quot;null&quot;

java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null" at javax.xml.parsers.SAXParserFactory.setXIncludeAware(SAXParserFactory.java:448) at org.apache.commons.digester.Digester.getFact

(转)null和NULL和nullptr和””区别

突然想到这个有趣的问题:C语言和C++对大小写是敏感的,也就是说null和NULL是区别对待的.NULL代表空地址,null只是一个符号.便来深究,看了很多资料,总结如下: 其实null和NULL都是字符串(没啥区别,欢迎高手纠错!),具体看它们宏定义被定义成为什么值. 在VS中NULL被定义为0,因为习惯上把宏定义的所有字符都大写,当把NULL它赋值给指针时意思为空,当然你也可以把null定义为0了,都一样. 它们都没定义时都只能叫符号了,定义后就有另外的意思了,你把0直接赋值给指针也行,只要

Table configuration with catalog null, schema null错误的一个原因

我在进行Mybatis调试时出现了下面的警告提示: Generation Warnings Occured Table configuration with catalog null, schema null, and table 表名 did not resolve to any tables Mybatis generator操作没有产生结果. 多处找资料发现在我的 generatorConfig.xml文件中: <jdbcConnection driverClass="com.mys

mysql中NULL和null的区别

接触php的web开发一段时间了,在进行数据库操作的时候经常会遇到一个问题,使得同一字段在页面显示时有3种类型NULL,null以及数字,当时的解决办法是将这一字段定义为varchar类型,在插入数据时加引号,一直没有深入研究.今天问题又出现了,当插入的值为null时,页面显示是空的!仔细研究发现: 1.向数据表insert 'NULL'和'null'时,在数据表中显示的分别为NULL和空.   2.向数据表insert null时,在数据表中显示也为NULL.   3.从数据库select '

MySQL timestamp NOT NULL插入NULL的问题

explicit_defaults_for_timestamp MySQL 5.6版本引入 explicit_defaults_for_timestamp 来控制对timestamp NULL值的处理 如果该参数不开启,则对timestamp NOT NULL插入NULL值,不报错,无warning,插入后的值为当前时间 如果在my.cnf中explicit_defaults_for_timestamp=1 那么插入该值的时候会报错提示该列can not be null 建议开启该值 mysql

Mysql 中is null 和 =null 的区别

在mysql中,筛选非空的时候经常会用到is not null和!=null,这两种方法单从字面上来看感觉是差不多的,其实如 果去运行一下试试的话差别会很大! 为什么会出现这种情况呢? null 表示什么也不是, 不能=.>.< … 所有的判断,结果都是false,所有只能用 is null进行判断.默认情况下,推荐使用 IS NOT NULL去判断,因为SQL默认情况下对!= Null的判断会永远返回0行,但没有语法错误 .如果你一定想要使用!= Null来判断,需要加上这个语句: set

C#对象为Null模式(Null Object Pattern)实例教程

本文以实例形式简单讲述了C#对象为Null模式(Null Object Pattern),分享给大家供大家参考.具体实现方法如下: 所谓的"对象为Null模式",就是要求开发者考虑对象为Null的情况,并设计出在这种情况下的应对方法. 以前面" "一文中的例子来说,在我们的客户端程序中只考虑了用户输入1,2,3的情况,如果用户输入其它数字,比如4,就没有一个对应的IBall接口实现类实例产生,于是会报如下的错: 为了应对这种情况,我们专门设计一个类,当用户输入1,2