怎么刷新fragmentt offset是怎么决定的

fragment offset是什么意思_百度知道
fragment offset是什么意思
提问者采纳
fset][美][&#712:fragment offset[英][ˈɔɔ 很高兴为您解答祝你生活愉快;sɛnt ˈfræt]分段差距;ɡməfˌɡməfrænt &#712片段偏移双语对照词典结果,学习进步如果你对这个答案有什么疑问
互联网高级技术员
其他类似问题
为您推荐:
offset的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁119425人阅读
最近搜了一些框架供初学者学习,比较了一下XUtils是目前git上比较活跃 功能比较完善的一个框架,是基于afinal开发的,比afinal稳定性提高了不少,下面是介绍:
鉴于大家的热情,我又写了一篇&-点击查看
xUtils简介
HttpUtils模块:
BitmapUtils模块:
使用xUtils快速开发框架需要有以下权限:
&uses-permission android:name=&android.permission.INTERNET& /& &uses-permission android:name=&android.permission.WRITE_EXTERNAL_STORAGE& /&
混淆时注意事项:
DbUtils使用方法:
DbUtils db = DbUtils.create(this);
User user = new User(); //这里需要注意的是User对象必须有id属性,或者有通过@ID注解的属性
user.setEmail(&&);
user.setName(&wyouflf&);
db.save(user); // 使用saveBindingId保存实体时会为实体的id赋值
Parent entity = db.findById(Parent.class, parent.getId());
List&Parent& list = db.findAll(Parent.class);//通过类型查找
Parent Parent = db.findFirst(Selector.from(Parent.class).where(&name&,&=&,&test&));
// IS NULL
Parent Parent = db.findFirst(Selector.from(Parent.class).where(&name&,&=&, null));
// IS NOT NULL
Parent Parent = db.findFirst(Selector.from(Parent.class).where(&name&,&!=&, null));
// WHERE id&54 AND (age&20 OR age&30) ORDER BY id LIMIT pageSize OFFSET pageOffset
List&Parent& list = db.findAll(Selector.from(Parent.class)
.where(&id& ,&&&, 54)
.and(WhereBuilder.b(&age&, &&&, 20).or(&age&, & & &, 30))
.orderBy(&id&)
.limit(pageSize)
.offset(pageSize * pageIndex));
// op为&in&时,最后一个参数必须是数组或Iterable的实现类(例如List等)
Parent test = db.findFirst(Selector.from(Parent.class).where(&id&, &in&, new int[]{1, 2, 3}));
// op为&between&时,最后一个参数必须是数组或Iterable的实现类(例如List等)
Parent test = db.findFirst(Selector.from(Parent.class).where(&id&, &between&, new String[]{&1&, &5&}));
DbModel dbModel = db.findDbModelAll(Selector.from(Parent.class).select(&name&));//select(&name&)只取出name列
List&DbModel& dbModels = db.findDbModelAll(Selector.from(Parent.class).groupBy(&name&).select(&name&, &count(name)&));
List&DbModel& dbModels = db.findDbModelAll(sql); // 自定义sql查询
db.execNonQuery(sql) // 执行自定义sql
ViewUtils使用方法
完全注解方式就可以进行UI绑定和事件绑定。无需findViewById和setClickListener等。
// xUtils的view注解要求必须提供id,以使代码混淆不受影响。
@ViewInject(R.id.textView)
TextView textView;
//@ViewInject(vale=R.id.textView, parentId=R.id.parentView)
//TextView textV
@ResInject(id = R.string.label, type = ResType.String)
private String label;
// 取消了之前使用方法名绑定事件的方式,使用id绑定不受混淆影响
// 支持绑定多个id @OnClick({R.id.id1, R.id.id2, R.id.id3})
// or @OnClick(value={R.id.id1, R.id.id2, R.id.id3}, parentId={R.id.pid1, R.id.pid2, R.id.pid3})
// 更多事件支持参见ViewCommonEventListener类和包com.lidroid.xutils.view.annotation.event。
@OnClick(R.id.test_button)
public void testButtonClick(View v) { // 方法签名必须和接口中的要求一致
//在Activity中注入:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ViewUtils.inject(this); //注入view和事件
textView.setText(&some text...&);
//在Fragment中注入:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.bitmap_fragment, container, false); // 加载fragment布局
ViewUtils.inject(this, view); //注入view和事件
//在PreferenceFragment中注入:
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
ViewUtils.inject(this, getPreferenceScreen()); //注入view和事件
// 其他重载
// inject(View view);
// inject(Activity activity)
// inject(PreferenceActivity preferenceActivity)
// inject(Object handler, View view)
// inject(Object handler, Activity activity)
// inject(Object handler, PreferenceGroup preferenceGroup)
// inject(Object handler, PreferenceActivity preferenceActivity)
HttpUtils使用方法:
普通get方法
HttpUtils http = new HttpUtils();
http.send(HttpRequest.HttpMethod.GET,
new RequestCallBack&String&(){
public void onLoading(long total, long current, boolean isUploading) {
testTextView.setText(current + &/& + total);
public void onSuccess(ResponseInfo&String& responseInfo) {
textView.setText(responseInfo.result);
public void onStart() {
public void onFailure(HttpException error, String msg) {
使用HttpUtils上传文件 或者 提交数据 到服务器(post方法)
RequestParams params = new RequestParams();
params.addHeader(&name&, &value&);
params.addQueryStringParameter(&name&, &value&);
// 只包含字符串参数时默认使用BodyParamsEntity,
// 类似于UrlEncodedFormEntity(&application/x-www-form-urlencoded&)。
params.addBodyParameter(&name&, &value&);
// 加入文件参数后默认使用MultipartEntity(&multipart/form-data&),
// 如需&multipart/related&,xUtils中提供的MultipartEntity支持设置subType为&related&。
// 使用params.setBodyEntity(httpEntity)可设置更多类型的HttpEntity(如:
// MultipartEntity,BodyParamsEntity,FileUploadEntity,InputStreamUploadEntity,StringEntity)。
// 例如发送json参数:params.setBodyEntity(new StringEntity(jsonStr,charset));
params.addBodyParameter(&file&, new File(&path&));
HttpUtils http = new HttpUtils();
http.send(HttpRequest.HttpMethod.POST,
&uploadUrl....&,
new RequestCallBack&String&() {
public void onStart() {
testTextView.setText(&conn...&);
public void onLoading(long total, long current, boolean isUploading) {
if (isUploading) {
testTextView.setText(&upload: & + current + &/& + total);
testTextView.setText(&reply: & + current + &/& + total);
public void onSuccess(ResponseInfo&String& responseInfo) {
testTextView.setText(&reply: & + responseInfo.result);
public void onFailure(HttpException error, String msg) {
testTextView.setText(error.getExceptionCode() + &:& + msg);
使用HttpUtils下载文件:
支持断点续传,随时停止下载任务,开始任务
HttpUtils http = new HttpUtils();
HttpHandler handler = http.download(&/httpcomponents/httpclient/source/httpcomponents-client-4.2.5-src.zip&,
&/sdcard/httpcomponents-client-4.2.5-src.zip&,
true, // 如果目标文件存在,接着未完成的部分继续下载。服务器不支持RANGE时将从新下载。
true, // 如果从请求返回信息中获取到文件名,下载完成后自动重命名。
new RequestCallBack&File&() {
public void onStart() {
testTextView.setText(&conn...&);
public void onLoading(long total, long current, boolean isUploading) {
testTextView.setText(current + &/& + total);
public void onSuccess(ResponseInfo&File& responseInfo) {
testTextView.setText(&downloaded:& + responseInfo.result.getPath());
public void onFailure(HttpException error, String msg) {
testTextView.setText(msg);
//调用cancel()方法停止下载
handler.cancel();
BitmapUtils 使用方法
BitmapUtils bitmapUtils = new BitmapUtils(this);
// 加载网络图片
bitmapUtils.display(testImageView, &/static/image/common/logo.png&);
// 加载本地图片(路径以/开头, 绝对路径)
bitmapUtils.display(testImageView, &/sdcard/test.jpg&);
// 加载assets中的图片(路径以assets开头)
bitmapUtils.display(testImageView, &assets/img/wallpaper.jpg&);
// 使用ListView等容器展示图片时可通过PauseOnScrollListener控制滑动和快速滑动过程中时候暂停加载图片
listView.setOnScrollListener(new PauseOnScrollListener(bitmapUtils, false, true));
listView.setOnScrollListener(new PauseOnScrollListener(bitmapUtils, false, true, customListener));
输出日志 LogUtils
// 自动添加TAG,格式: className.methodName(L:lineNumber)
// 可设置全局的LogUtils.allowD = false,LogUtils.allowI = false...,控制是否输出log。
// 自定义log输出LogUtils.customLogger = new xxxLogger();
LogUtils.d(&wyouflf&);
Email:&,&
近来有一些其他网站盗用本博客内容,希望尊重作者。如有问题请留言,转载注明出处。
项目git地址
实例,BitmapUtils:
实例:HttpGet:
实例:HttpPost(和HttpGet类似):
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:956475次
积分:10020
积分:10020
排名:第771名
原创:67篇
转载:620篇
评论:182条
(41)(30)(17)(11)(3)(5)(11)(18)(17)(13)(17)(7)(6)(27)(19)(47)(1)(19)(11)(2)(1)(26)(20)(10)(6)(2)(8)(3)(10)(9)(6)(4)(15)(7)(2)(7)(8)(50)(14)(11)(26)(20)(4)(1)(5)(14)(12)(4)(4)(3)(2)(4)(2)(4)(1)(1)(1)(3)(2)(11)(3)(8)(15)(2)(1)2191人阅读
http 协议的交互过程详细分析。
以wget &file&& wireshark 抓包分析。
在&netinet/ip.h& 中,有如下定义
struct iphdr
#if __BYTE_ORDER == __LITTLE_ENDIAN
&&& unsigned int ihl:4;
&&& unsigned int version:4;
#elif __BYTE_ORDER == __BIG_ENDIAN
&&& unsigned int version:4;
&&& unsigned int ihl:4;
# error&& &&Please fix &bits/endian.h&&
&&& u_int8_
&&& u_int16_t tot_
&&& u_int16_
&&& u_int16_t frag_
&&& u_int8_
&&& u_int8_
&&& u_int16_
&&& u_int32_
&&& u_int32_
&&& /*The options start here. */
ip header, 占用20个byte. 按32bits(4btes)为一dword, 占5个dword.
其中最重要的是saddr, daddr, protocol 不变,前3字节总是45 00 00, id, total_len, checksum 会改变
在&netinet/tcp.h& 中,有如下定义
struct tcphdr
&&& u_int16_t th_&& &&& &/* source port */
&&& u_int16_t th_&& &&& &/* destination port */
&&& tcp_seq th_&& &&& &/* sequence number */
&&& tcp_seq th_&& &&& &/* acknowledgement number */
#& if __BYTE_ORDER == __LITTLE_ENDIAN
&&& u_int8_t th_x2:4;&& &&& &/* (unused) */
&&& u_int8_t th_off:4;&& &&& &/* data offset */
#& if __BYTE_ORDER == __BIG_ENDIAN
&&& u_int8_t th_off:4;&& &&& &/* data offset */
&&& u_int8_t th_x2:4;&& &&& &/* (unused) */
&&& u_int8_t th_
#& define TH_FIN&& &0x01
#& define TH_SYN&& &0x02
#& define TH_RST&& &0x04
#& define TH_PUSH&& &0x08
#& define TH_ACK&& &0x10
#& define TH_URG&& &0x20
&&& u_int16_t th_&& &&& &/* window */
&&& u_int16_t th_&& &&& &/* checksum */
&&& u_int16_t th_&& &&& &/* urgent pointer */
tcp header, 占用20bytes, ip地址和端口唯一确定连接, seq,ack保证可靠连接。
flags 说明数据包性质, window 大小,说明作为接受端可以接受的数据大小。调整速率用。
下面实例,用wireshark 抓包, 用以分析建立tcp连接的三次握手过程,http 协议过程, 及断开tcp的过程。
--------------------------------------------------------------------------------
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
24&&&&& 7.&&& 192.168.3.110&&&&&&&& 192.168.3.126&&&&&&&& TCP&&&&& 66&&&& kazaa & http [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1
--------------------------------------------------------------------------------
Frame 24: 66 bytes on wire (528 bits), 66 bytes captured (528 bits) on interface 0
Ethernet II, Src: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f), Dst: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Destination: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Source: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Type: IP (0x0800)
Internet Protocol Version 4, Src: 192.168.3.110 (192.168.3.110), Dst: 192.168.3.126 (192.168.3.126)
&&& Version: 4&& &&& &&& &&& &&& &&& &&& &&& &&& &;45
&&& Header length: 20 bytes&& &&& &&& &&& &&& &&& &;^^
&&& Differentiated Services Field: 0x00 (DSCP 0x00: D ECN: 0x00: Not-ECT (Not ECN-Capable Transport)) ;00
&&& Total Length: 52&& &&& &&& &&& &&& &&& &&& &;00 34
&&& Identification: 0x019b (411)&& &&& &&& &&& &;01 9b
&&& Flags: 0x02 (Don't Fragment)&& &&& &&& &&& &;40 00
&&& Fragment offset: 0&& &&& &&& &&& &&& &&& &&& &;^^
&&& Time to live: 128&& &&& &&& &&& &&& &&& &&& &;80
&&& Protocol: TCP (6)&& &&& &&& &&& &&& &&& &&& &;06
&&& Header checksum: 0x70ec [correct] && &&& &&& &;70 ec
&&& Source: 192.168.3.110 (192.168.3.110)&& &&& &;c0 a8 03 6e
&&& Destination: 192.168.3.126 (192.168.3.126)&& &;c0 a8 03 7e
Transmission Control Protocol, Src Port: kazaa (1214), Dst Port: http (80), Seq: 0, Len: 0
&&& Source port: kazaa (1214)&& &&& &&& &&& &&& &&& &&& &;04 be
&&& Destination port: http (80)&&&&&&&&&&&&&&&&&&&&&&&& ;00 50
&&& [Stream index: 8]&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;a1 27 74 61
&&& Sequence number: 0&&& (relative sequence number)&&& ;00 00 00 00
&&& Header length: 32 bytes&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;80
&&& Flags: 0x002 (SYN)&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;02
&&& Window size value: 8192&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;20 00
&&& [Calculated window size: 8192]&&&&&&&&&&&&&&&&&&&& &
&&& Checksum: 0xac3c [validation disabled]&&&&&&&&&&&&& ;ac 3c
&&& Options: (12 bytes), Maximum segment size, No-Operation (NOP), Window scale, No-Operation (NOP), No-Operation (NOP), SACK permitted
& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &;02 04 05 b4 01 03 03 08 01 01 04 02
0000& f0 4d a2 31 48 1f 00 1a a0 8d 1d 7f 08 00 45 00&& .M.1H.........E.
01 9b 40 00 80 06 70 ec c0 a8 03 6e c0 a8&& .4..@...p....n..
e 04 be 00 50 a1 27 74 61 00 00 00 00 80 02&& .~...P.'ta......
ac 3c 00 00 02 04 05 b4 01 03 03 08 01 01&&& ..&............
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ..
--------------------------------------------------------------------------------
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
25&&&&& 7.&&& 192.168.3.126&&&&&&&& 192.168.3.110&&&&&&&& TCP&&&&& 66&&&& http & kazaa [SYN, ACK] Seq=0 Ack=1 Win=14600 Len=0 MSS=1460 SACK_PERM=1 WS=128
--------------------------------------------------------------------------------
Frame 25: 66 bytes on wire (528 bits), 66 bytes captured (528 bits) on interface 0
Ethernet II,& Ethernet 协议完全相同
Internet Protocol Version 4, Src: 192.168.3.126 (192.168.3.126), Dst: 192.168.3.110 (192.168.3.110)
&& &;version,header length 完全一样。total length 不同 && &&& &&& &&& &;45 00 00 34
&& &;Identification会加1, Flags, Fragment offset 相同 &&& &&& &&& &&& &;00 00 40 00
&& &;time to live 可以不同。protocal不变, 因而header checksum不同 && &;40 06 b2 87
&&& ;src, dst 地址相同。&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;c0 a8 03 7e
&& &&& &&& &&& &&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;c0 a8 03 6e
Transmission Control Protocol, Src Port: http (80), Dst Port: kazaa (1214), Seq: 0, Ack: 1, Len: 0
&&& Source port: http (80)&& &&& &&& &&& &&& &&& &&& &&& &;00 50
&&& Destination port: kazaa (1214)&&&&&&&&&&&&&&&&&&&&& ;04 be
&&& [Stream index: 8]
&&& Sequence number: 0&&& (relative sequence number)&&& ;54 9b 81 4a
&&& Acknowledgment number: 1&&& (relative ack number)&& ;a1 27 74 62
&&& Header length: 32 bytes&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;80
&&& Flags: 0x012 (SYN, ACK)&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;12
&&& Window size value: 14600&&&&&&&&&&&&&&&&&&&&&&&&&&& ;39 08
&&& [Calculated window size: 14600]
&&& Checksum: 0xbd3e [validation disabled]&&&&&&&&&&&&& ;bd 3e
&&& Options: (12 bytes), Maximum segment size, No-Operation (NOP), No-Operation (NOP), SACK permitted, No-Operation (NOP), Window scale
&&& [SEQ/ACK analysis] &&& &&& &&& &&& &&& &&& &&& &&& &;02 04 05 b4 01 01 04 02 01 03 03 07
a a0 8d 1d 7f f0 4d a2 31 48 1f 08 00 45 00&& .......M.1H...E.
00 00 40 00 40 06 b2 87 c0 a8 03 7e c0 a8&& .4..@.@......~..
e 00 50 04 be 54 9b 81 4a a1 27 74 62 80 12&& .n.P..T..J.'tb..
bd 3e 00 00 02 04 05 b4 01 01 04 02 01 03&& 9..&............
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ..
--------------------------------------------------------------------------------
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
26&&&&& 7.&&& 192.168.3.110&&&&&&&& 192.168.3.126&&&&&&&& TCP&&&&& 60&&&& kazaa & http [ACK] Seq=1 Ack=1 Win=65536 Len=0
--------------------------------------------------------------------------------
Frame 26: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II,& Ethernet 协议完全相同
Internet Protocol Version 4, Src: 192.168.3.110 (192.168.3.110), Dst: 192.168.3.126 (192.168.3.126)
&& &;version,header length 完全一样。total length 不同 && &&& &&& &&& &;45 00 00 28
&& &;Identification会加1, Flags, Fragment offset 相同 &&& &&& &&& &&& &;01 9c 40 00
&& &;time to live 可以不同。protocal不变, 因而header checksum不同 && &;80 06 70 f7
&&& ;src, dst 地址相同。&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;c0 a8 03 6e
&& &&& &&& &&& &&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;c0 a8 03 7e
Transmission Control Protocol, Src Port: kazaa (1214), Dst Port: http (80), Seq: 1, Ack: 1, Len: 0
;src dst port 会相应设置,sequence number, acknowledge number 会加1.
;flags 说明类型, windows size 及 checksum 被设置。
;至此,三段握手完成,连接已经建立。
&&& Source port: kazaa (1214)&& &&& &&& &&& &&& &&& &&& &;04 be
&&& Destination port: http (80)&&&&&&&&&&&&&&&&&&&&&&&& ;00 50
&&& [Stream index: 8]
&&& Sequence number: 1&&& (relative sequence number)&&& ;a1 27 74 62
&&& Acknowledgment number: 1&&& (relative ack number)&& ;54 9b 81 4b
&&& Header length: 20 bytes&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;50
&&& Flags: 0x010 (ACK)&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;10
&&& Window size value: 256&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;01 00
&&& [Calculated window size: 65536]
&&& [Window size scaling factor: 256]
&&& Checksum: 0x3619 [validation disabled]&&&&&&&&&&&&& ;36 19
0000& f0 4d a2 31 48 1f 00 1a a0 8d 1d 7f 08 00 45 00&& .M.1H.........E.
01 9c 40 00 80 06 70 f7 c0 a8 03 6e c0 a8&& .(..@...p....n..
e 04 be 00 50 a1 27 74 62 54 9b 81 4b 50 10&& .~...P.'tbT..KP.
36 19 00 00 00 00 00 00 00 00&&&&&&&&&&&&&& ..6.........
--------------------------------------------------------------------------------
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
27&&&&& 7.&&& 192.168.3.110&&&&&&&& 192.168.3.126&&&&&&&& HTTP&&&& 171&&& GET /example.php HTTP/1.0
--------------------------------------------------------------------------------
Frame 27: 171 bytes on wire (1368 bits), 171 bytes captured (1368 bits) on interface 0
Internet Protocol Version 4, Src: 192.168.3.110 (192.168.3.110), Dst: 192.168.3.126 (192.168.3.126)
&&& Version: 4
&&& Header length: 20 bytes
&&& Differentiated Services Field: 0x00 (DSCP 0x00: D ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
&&& Total Length: 157&& &&& &&& &&& &&& &;45 00 00 9d(total lenth)
&&& Identification: 0x019d (413)
&&& Flags: 0x02 (Don't Fragment)&&&&&&& ;01 9d 40 00 (id)
&&& Fragment offset: 0
&&& Time to live: 128&&&&&&&&&&&&&&&&&& ;80 06 70 81 (checksum)
&&& Protocol: TCP (6)
&&& Header checksum: 0x7081 [correct]
&&& Source: 192.168.3.110 (192.168.3.110)&&&&&& ;c0 a8 03 6e
&&& Destination: 192.168.3.126 (192.168.3.126)& ;c0 a8 03 7e
Transmission Control Protocol, Src Port: kazaa (1214), Dst Port: http (80), Seq: 1, Ack: 1, Len: 117
&&& Source port: kazaa (1214)&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&& &;04 be 00 50
&&& Destination port: http (80)
&&& [Stream index: 8]&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &
&&& Sequence number: 1&&& (relative sequence number)&&&&&&&&&&&& ;a1 27 74 62
&&& [Next sequence number: 118&&& (relative sequence number)]
&&& Acknowledgment number: 1&&& (relative ack number)&&&&&&&&&&& ;54 9b 81 4b
&&& Header length: 20 bytes&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ;50 18 01 00
&&& Flags: 0x018 (PSH, ACK)
&&& Window size value: 256
&&& [Calculated window size: 65536]
&&& [Window size scaling factor: 256]
&&& Checksum: 0x8456 [validation disabled]&&&&&&&&&&&&&&&&&&&&&& ;84 56 00 00
&&& [SEQ/ACK analysis]
Hypertext Transfer Protocol
&&& GET /example.php HTTP/1.0\r\n
&&& User-Agent: Wget/1.12 (msys)\r\n
&&& Accept: */*\r\n
&&& Host: 192.168.3.126\r\n
&&& Connection: Keep-Alive\r\n
&&& [Full request URI: http://192.168.3.126/example.php]
0000& f0 4d a2 31 48 1f 00 1a a0 8d 1d 7f 08 00 45 00&& .M.1H.........E.
d 01 9d 40 00 80 06 70 81 c0 a8 03 6e c0 a8&& ....@...p....n..
e 04 be 00 50 a1 27 74 62 54 9b 81 4b 50 18&& .~...P.'tbT..KP.
84 56 00 00 47 45 54 20 2f 65 78 61 6d 70&& ...V..GET /examp
2e 70 68 70 20 48 54 54 50 2f 31 2e 30 0d&& le.php HTTP/1.0.
73 65 72 2d 41 67 65 6e 74 3a 20 57 67 65&& .User-Agent: Wge
f 31 2e 31 32 20 28 6d 73 79 73 29 0d 0a 41&& t/1.12 (msys)..A
65 70 74 3a 20 2a 2f 2a 0d 0a 48 6f 73 74&& ccept: */*..Host
31 39 32 2e 31 36 38 2e 33 2e 31 32 36 0d&& : 192.168.3.126.
6f 6e 6e 65 63 74 69 6f 6e 3a 20 4b 65 65&& .Connection: Kee
00a0& 70 2d 41 6c 69 76 65 0d 0a 0d 0a&&&&&&&&&&&&&&&&& p-Alive....
我们看到, http get 是一个tcp的push ack 包
--------------------------------------------------------------------------------
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
28&&&&& 7.&&& 192.168.3.126&&&&&&&& 192.168.3.110&&&&&&&& TCP&&&&& 54&&&& http & kazaa [ACK] Seq=1 Ack=118 Win=14720 Len=0
--------------------------------------------------------------------------------
Frame 28: 54 bytes on wire (432 bits), 54 bytes captured (432 bits) on interface 0
Ethernet II, Src: Dell_31:48:1f (f0:4d:a2:31:48:1f), Dst: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Destination: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Source: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Type: IP (0x0800)
Internet Protocol Version 4, Src: 192.168.3.126 (192.168.3.126), Dst: 192.168.3.110 (192.168.3.110)
&&& Version: 4
&&& Header length: 20 bytes
&&& Differentiated Services Field: 0x00 (DSCP 0x00: D ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
&&& Total Length: 40
&&& Identification: 0xc01f (49183)
&&& Flags: 0x02 (Don't Fragment)
&&& Fragment offset: 0
&&& Time to live: 64
&&& Protocol: TCP (6)
&&& Header checksum: 0xf273 [correct]
&&& Source: 192.168.3.126 (192.168.3.126)
&&& Destination: 192.168.3.110 (192.168.3.110)
Transmission Control Protocol, Src Port: http (80), Dst Port: kazaa (1214), Seq: 1, Ack: 118, Len: 0
&&& Source port: http (80)
&&& Destination port: kazaa (1214)
&&& [Stream index: 8]
&&& Sequence number: 1&&& (relative sequence number)
&&& Acknowledgment number: 118&&& (relative ack number)
&&& Header length: 20 bytes
&&& Flags: 0x010 (ACK)
&&& Window size value: 115
&&& [Calculated window size: 14720]
&&& [Window size scaling factor: 128]
&&& Checksum: 0x3631 [validation disabled]
&&& [SEQ/ACK analysis]
a a0 8d 1d 7f f0 4d a2 31 48 1f 08 00 45 00&& .......M.1H...E.
c0 1f 40 00 40 06 f2 73 c0 a8 03 7e c0 a8&& .(..@.@..s...~..
e 00 50 04 be 54 9b 81 4b a1 27 74 d7 50 10&& .n.P..T..K.'t.P.
36 31 00 00&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& .s61..
;是一个ACK 相应包
--------------------------------------------------------------------------------
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
29&&&&& 7.&&& 192.168.3.126&&&&&&&& 192.168.3.110&&&&&&&& TCP&&&&& 305&&& [TCP segment of a reassembled PDU]
--------------------------------------------------------------------------------
Frame 29: 305 bytes on wire (2440 bits), 305 bytes captured (2440 bits) on interface 0
Ethernet II, Src: Dell_31:48:1f (f0:4d:a2:31:48:1f), Dst: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Destination: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Source: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Type: IP (0x0800)
Internet Protocol Version 4, Src: 192.168.3.126 (192.168.3.126), Dst: 192.168.3.110 (192.168.3.110)
&&& Version: 4
&&& Header length: 20 bytes
&&& Differentiated Services Field: 0x00 (DSCP 0x00: D ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
&&& Total Length: 291
&&& Identification: 0xc020 (49184)
&&& Flags: 0x02 (Don't Fragment)
&&& Fragment offset: 0
&&& Time to live: 64
&&& Protocol: TCP (6)
&&& Header checksum: 0xf177 [correct]
&&& Source: 192.168.3.126 (192.168.3.126)
&&& Destination: 192.168.3.110 (192.168.3.110)
Transmission Control Protocol, Src Port: http (80), Dst Port: kazaa (1214), Seq: 1, Ack: 118, Len: 251
&&& Source port: http (80)
&&& Destination port: kazaa (1214)
&&& [Stream index: 8]
&&& Sequence number: 1&&& (relative sequence number)
&&& [Next sequence number: 252&&& (relative sequence number)]
&&& Acknowledgment number: 118&&& (relative ack number)
&&& Header length: 20 bytes
&&& Flags: 0x018 (PSH, ACK)
&&& Window size value: 115
&&& [Calculated window size: 14720]
&&& [Window size scaling factor: 128]
&&& Checksum: 0x8952 [validation disabled]
&&& [SEQ/ACK analysis]
&&& TCP segment data (251 bytes)
a a0 8d 1d 7f f0 4d a2 31 48 1f 08 00 45 00&& .......M.1H...E.
c0 20 40 00 40 06 f1 77 c0 a8 03 7e c0 a8&& .#. @.@..w...~..
e 00 50 04 be 54 9b 81 4b a1 27 74 d7 50 18&& .n.P..T..K.'t.P.
89 52 00 00 48 54 54 50 2f 31 2e 31 20 32&& .s.R..HTTP/1.1 2
20 4f 4b 0d 0a 53 65 72 76 65 72 3a 20 6e&& 00 OK..Server: n
6e 78 2f 31 2e 34 2e 30 0d 0a 44 61 74 65&& ginx/1.4.0..Date
57 65 64 2c 20 31 38 20 4a 75 6e 20 32 30&& : Wed, 18 Jun 20
20 30 32 3a 33 35 3a 30 32 20 47 4d 54 0d&& 14 02:35:02 GMT.
6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61&& .Content-Type: a
6c 69 63 61 74 69 6f 6e 2f 6f 63 74 65 74&& pplication/octet
00a0& 2d 73 74 72 65 61 6d 0d 0a 43 6f 6e 74 65 6e 74&& -stream..Content
00b0& 2d 4c 65 6e 67 74 68 3a 20 31 31 34 0d 0a 4c 61&& -Length: 114..La
00c0& 73 74 2d 4d 6f 64 69 66 69 65 64 3a 20 54 75 65&& st-Modified: Tue
00d0& 2c 20 31 37 20 4a 75 6e 20 32 30 31 34 20 30 37&& , 17 Jun 2014 07
00e0& 3a 30 37 3a 31 39 20 47 4d 54 0d 0a 43 6f 6e 6e&& :07:19 GMT..Conn
00f0& 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69&& ection: keep-ali
0d 0a 45 54 61 67 3a 20 22 35 33 39 66 65&& ve..ETag: &539fe
37 2d 37 32 22 0d 0a 41 63 63 65 70 74 2d&& 927-72&..Accept-
6e 67 65 73 3a 20 62 79 74 65 73 0d 0a 0d&& Ranges: bytes...
0130& 0a&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& .
是一个push ack 包,
--------------------------------------------------------------------------------
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
30&&&&& 8.&&& 192.168.3.110&&&&&&&& 192.168.3.126&&&&&&&& TCP&&&&& 60&&&& kazaa & http [ACK] Seq=118 Ack=252 Win=65280 Len=0
--------------------------------------------------------------------------------
Frame 30: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f), Dst: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Destination: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Source: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Type: IP (0x0800)
&&& Padding:
Internet Protocol Version 4, Src: 192.168.3.110 (192.168.3.110), Dst: 192.168.3.126 (192.168.3.126)
&&& Version: 4
&&& Header length: 20 bytes
&&& Differentiated Services Field: 0x00 (DSCP 0x00: D ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
&&& Total Length: 40
&&& Identification: 0x019e (414)
&&& Flags: 0x02 (Don't Fragment)
&&& Fragment offset: 0
&&& Time to live: 128
&&& Protocol: TCP (6)
&&& Header checksum: 0x70f5 [correct]
&&& Source: 192.168.3.110 (192.168.3.110)
&&& Destination: 192.168.3.126 (192.168.3.126)
Transmission Control Protocol, Src Port: kazaa (1214), Dst Port: http (80), Seq: 118, Ack: 252, Len: 0
&&& Source port: kazaa (1214)
&&& Destination port: http (80)
&&& [Stream index: 8]
&&& Sequence number: 118&&& (relative sequence number)
&&& Acknowledgment number: 252&&& (relative ack number)
&&& Header length: 20 bytes
&&& Flags: 0x010 (ACK)
&&& Window size value: 255
&&& [Calculated window size: 65280]
&&& [Window size scaling factor: 256]
&&& Checksum: 0x34aa [validation disabled]
&&& [SEQ/ACK analysis]
0000& f0 4d a2 31 48 1f 00 1a a0 8d 1d 7f 08 00 45 00&& .M.1H.........E.
01 9e 40 00 80 06 70 f5 c0 a8 03 6e c0 a8&& .(..@...p....n..
e 04 be 00 50 a1 27 74 d7 54 9b 82 46 50 10&& .~...P.'t.T..FP.
0030& 00 ff 34 aa 00 00 00 00 00 00 00 00&&&&&&&&&&&&&& ..4.........
;是一个响应包 ack
--------------------------------------------------------------------------------
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
31&&&&& 8.&&& 192.168.3.126&&&&&&&& 192.168.3.110&&&&&&&& HTTP/DL& 168&&& unknown (0x3c)
--------------------------------------------------------------------------------
Frame 31: 168 bytes on wire (1344 bits), 168 bytes captured (1344 bits) on interface 0
Ethernet II, Src: Dell_31:48:1f (f0:4d:a2:31:48:1f), Dst: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Destination: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Source: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Type: IP (0x0800)
Internet Protocol Version 4, Src: 192.168.3.126 (192.168.3.126), Dst: 192.168.3.110 (192.168.3.110)
&&& Version: 4
&&& Header length: 20 bytes
&&& Differentiated Services Field: 0x00 (DSCP 0x00: D ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
&&& Total Length: 154
&&& Identification: 0xc021 (49185)
&&& Flags: 0x02 (Don't Fragment)
&&& Fragment offset: 0
&&& Time to live: 64
&&& Protocol: TCP (6)
&&& Header checksum: 0xf1ff [correct]
&&& Source: 192.168.3.126 (192.168.3.126)
&&& Destination: 192.168.3.110 (192.168.3.110)
Transmission Control Protocol, Src Port: http (80), Dst Port: kazaa (1214), Seq: 252, Ack: 118, Len: 114
&&& Source port: http (80)
&&& Destination port: kazaa (1214)
&&& [Stream index: 8]
&&& Sequence number: 252&&& (relative sequence number)
&&& [Next sequence number: 366&&& (relative sequence number)]
&&& Acknowledgment number: 118&&& (relative ack number)
&&& Header length: 20 bytes
&&& Flags: 0x018 (PSH, ACK)
&&& Window size value: 115
&&& [Calculated window size: 14720]
&&& [Window size scaling factor: 128]
&&& Checksum: 0x88c9 [validation disabled]
&&& [SEQ/ACK analysis]
&&& TCP segment data (114 bytes)
[2 Reassembled TCP Segments (365 bytes): #29(251), #31(114)]
Hypertext Transfer Protocol
&&& HTTP/1.1 200 OK\r\n
&&& Server: nginx/1.4.0\r\n
&&& Date: Wed, 18 Jun :02 GMT\r\n
&&& Content-Type: application/octet-stream\r\n
&&& Content-Length: 114\r\n
&&& Last-Modified: Tue, 17 Jun :19 GMT\r\n
&&& Connection: keep-alive\r\n
&&& ETag: &539fe927-72&\r\n
&&& Accept-Ranges: bytes\r\n
SIP/NOE Protocol, unknown (0x3c)
;下面是helloworld.php 的代码, wireshark 按二进制数据分析
Frame (168 bytes):
a a0 8d 1d 7f f0 4d a2 31 48 1f 08 00 45 00&& .......M.1H...E.
a c0 21 40 00 40 06 f1 ff c0 a8 03 7e c0 a8&& ...!@.@......~..
e 00 50 04 be 54 9b 82 46 a1 27 74 d7 50 18&& .n.P..T..F.'t.P.
88 c9 00 00 3c 68 74 6d 6c 3e 0a 20 3c 68&& .s....&html&. &h
64 3e 0a 20 20 3c 74 69 74 6c 65 3e 50 48&& ead&.& &title&PH
e6 b5 8b e8 af 95 3c 2f 74 69 74 6c 65 3e&& P ......&/title&
3c 2f 68 65 61 64 3e 0a 20 3c 62 6f 64 79&& . &/head&. &body
a 20 3c 3f 70 68 70 20 65 63 68 6f 20 27 3c&& &. &?php echo '&
e 48 65 6c 6c 6f 20 57 6f 72 6c 64 3c 2f 70&& p&Hello World&/p
3b 20 3f 3e 0a 20 3c 2f 62 6f 64 79 3e 0a&& &'; ?&. &/body&.
00a0& 3c 2f 68 74 6d 6c 3e 0a&&&&&&&&&&&&&&&&&&&&&&&&&& &/html&.
Reassembled TCP (365 bytes):
54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d&& HTTP/1.1 200 OK.
65 72 76 65 72 3a 20 6e 67 69 6e 78 2f 31&& .Server: nginx/1
2e 30 0d 0a 44 61 74 65 3a 20 57 65 64 2c&& .4.0..Date: Wed,
38 20 4a 75 6e 20 32 30 31 34 20 30 32 3a&&& 18 Jun 2014 02:
3a 30 32 20 47 4d 54 0d 0a 43 6f 6e 74 65&& 35:02 GMT..Conte
2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61&& nt-Type: applica
6f 6e 2f 6f 63 74 65 74 2d 73 74 72 65 61&& tion/octet-strea
d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74&& m..Content-Lengt
a 20 31 31 34 0d 0a 4c 61 73 74 2d 4d 6f 64&& h: 114..Last-Mod
69 65 64 3a 20 54 75 65 2c 20 31 37 20 4a&& ified: Tue, 17 J
00a0& 75 6e 20 32 30 31 34 20 30 37 3a 30 37 3a 31 39&& un :19
00b0& 20 47 4d 54 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e&&& GMT..Connection
00c0& 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 45 54&& : keep-alive..ET
00d0& 61 67 3a 20 22 35 33 39 66 65 39 32 37 2d 37 32&& ag: &539fe927-72
00e0& 22 0d 0a 41 63 63 65 70 74 2d 52 61 6e 67 65 73&& &..Accept-Ranges
00f0& 3a 20 62 79 74 65 73 0d 0a 0d 0a 3c 68 74 6d 6c&& : bytes....&html
a 20 3c 68 65 61 64 3e 0a 20 20 3c 74 69 74&& &. &head&.& &tit
3e 50 48 50 20 e6 b5 8b e8 af 95 3c 2f 74&& le&PHP ......&/t
6c 65 3e 0a 20 3c 2f 68 65 61 64 3e 0a 20&& itle&. &/head&.
6f 64 79 3e 0a 20 3c 3f 70 68 70 20 65 63&& &body&. &?php ec
f 20 27 3c 70 3e 48 65 6c 6c 6f 20 57 6f 72&& ho '&p&Hello Wor
3c 2f 70 3e 27 3b 20 3f 3e 0a 20 3c 2f 62&& ld&/p&'; ?&. &/b
79 3e 0a 3c 2f 68 74 6d 6c 3e 0a&&&&&&&&&&& ody&.&/html&.
;与上一个包重新组装成一个完整http 包。
--------------------------------------------------------------------------------
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
32&&&&& 8.&&& 192.168.3.110&&&&&&&& 192.168.3.126&&&&&&&& TCP&&&&& 60&&&& kazaa & http [FIN, ACK] Seq=118 Ack=366 Win=65280 Len=0
--------------------------------------------------------------------------------
Frame 32: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f), Dst: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Destination: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Source: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Type: IP (0x0800)
&&& Padding:
Internet Protocol Version 4, Src: 192.168.3.110 (192.168.3.110), Dst: 192.168.3.126 (192.168.3.126)
&&& Version: 4
&&& Header length: 20 bytes
&&& Differentiated Services Field: 0x00 (DSCP 0x00: D ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
&&& Total Length: 40
&&& Identification: 0x019f (415)
&&& Flags: 0x02 (Don't Fragment)
&&& Fragment offset: 0
&&& Time to live: 128
&&& Protocol: TCP (6)
&&& Header checksum: 0x70f4 [correct]
&&& Source: 192.168.3.110 (192.168.3.110)
&&& Destination: 192.168.3.126 (192.168.3.126)
Transmission Control Protocol, Src Port: kazaa (1214), Dst Port: http (80), Seq: 118, Ack: 366, Len: 0
&&& Source port: kazaa (1214)
&&& Destination port: http (80)
&&& [Stream index: 8]
&&& Sequence number: 118&&& (relative sequence number)
&&& Acknowledgment number: 366&&& (relative ack number)
&&& Header length: 20 bytes
&&& Flags: 0x011 (FIN, ACK)
&&& Window size value: 255
&&& [Calculated window size: 65280]
&&& [Window size scaling factor: 256]
&&& Checksum: 0x3437 [validation disabled]
&&& [SEQ/ACK analysis]
0000& f0 4d a2 31 48 1f 00 1a a0 8d 1d 7f 08 00 45 00&& .M.1H.........E.
01 9f 40 00 80 06 70 f4 c0 a8 03 6e c0 a8&& .(..@...p....n..
e 04 be 00 50 a1 27 74 d7 54 9b 82 b8 50 11&& .~...P.'t.T...P.
0030& 00 ff 34 37 00 00 00 00 00 00 00 00&&&&&&&&&&&&&& ..47........
(FIN, ACK) 包, ACK 是对收到数据的确认。
FIN, 客户端向服务器端断开连接4次挥手的开始。& 当然,服务器端也可以主动断开连接,其流程是一样的。
--------------------------------------------------------------------------------
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
33&&&&& 8.&&& 192.168.3.126&&&&&&&& 192.168.3.110&&&&&&&& TCP&&&&& 54&&&& http & kazaa [FIN, ACK] Seq=366 Ack=119 Win=14720 Len=0
--------------------------------------------------------------------------------
Frame 33: 54 bytes on wire (432 bits), 54 bytes captured (432 bits) on interface 0
Ethernet II, Src: Dell_31:48:1f (f0:4d:a2:31:48:1f), Dst: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Destination: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Source: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Type: IP (0x0800)
Internet Protocol Version 4, Src: 192.168.3.126 (192.168.3.126), Dst: 192.168.3.110 (192.168.3.110)
&&& Version: 4
&&& Header length: 20 bytes
&&& Differentiated Services Field: 0x00 (DSCP 0x00: D ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
&&& Total Length: 40
&&& Identification: 0xc022 (49186)
&&& Flags: 0x02 (Don't Fragment)
&&& Fragment offset: 0
&&& Time to live: 64
&&& Protocol: TCP (6)
&&& Header checksum: 0xf270 [correct]
&&& Source: 192.168.3.126 (192.168.3.126)
&&& Destination: 192.168.3.110 (192.168.3.110)
Transmission Control Protocol, Src Port: http (80), Dst Port: kazaa (1214), Seq: 366, Ack: 119, Len: 0
&&& Source port: http (80)
&&& Destination port: kazaa (1214)
&&& [Stream index: 8]
&&& Sequence number: 366&&& (relative sequence number)
&&& Acknowledgment number: 119&&& (relative ack number)
&&& Header length: 20 bytes
&&& Flags: 0x011 (FIN, ACK)
&&& Window size value: 115
&&& [Calculated window size: 14720]
&&& [Window size scaling factor: 128]
&&& Checksum: 0x34c2 [validation disabled]
&&& [SEQ/ACK analysis]
;这是4次挥手的2和3步, 服务器端向客户端的 ACK, FIN包,它们是可以分开发的,这里合并在一起发送。
a a0 8d 1d 7f f0 4d a2 31 48 1f 08 00 45 00&& .......M.1H...E.
c0 22 40 00 40 06 f2 70 c0 a8 03 7e c0 a8&& .(.&@.@..p...~..
e 00 50 04 be 54 9b 82 b8 a1 27 74 d8 50 11&& .n.P..T....'t.P.
34 c2 00 00&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& .s4...
No.&&&& Time&&&&&&&&&& Source&&&&&&&&&&&&&&& Destination&&&&&&&&&& Protocol Length Info
34&&&&& 8.&&& 192.168.3.110&&&&&&&& 192.168.3.126&&&&&&&& TCP&&&&& 60&&&& kazaa & http [ACK] Seq=119 Ack=367 Win=65280 Len=0
Frame 34: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f), Dst: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Destination: Dell_31:48:1f (f0:4d:a2:31:48:1f)
&&& Source: Dell_8d:1d:7f (00:1a:a0:8d:1d:7f)
&&& Type: IP (0x0800)
&&& Padding:
Internet Protocol Version 4, Src: 192.168.3.110 (192.168.3.110), Dst: 192.168.3.126 (192.168.3.126)
&&& Version: 4
&&& Header length: 20 bytes
&&& Differentiated Services Field: 0x00 (DSCP 0x00: D ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
&&& Total Length: 40
&&& Identification: 0x01a0 (416)
&&& Flags: 0x02 (Don't Fragment)
&&& Fragment offset: 0
&&& Time to live: 128
&&& Protocol: TCP (6)
&&& Header checksum: 0x70f3 [correct]
&&& Source: 192.168.3.110 (192.168.3.110)
&&& Destination: 192.168.3.126 (192.168.3.126)
Transmission Control Protocol, Src Port: kazaa (1214), Dst Port: http (80), Seq: 119, Ack: 367, Len: 0
&&& Source port: kazaa (1214)
&&& Destination port: http (80)
&&& [Stream index: 8]
&&& Sequence number: 119&&& (relative sequence number)
&&& Acknowledgment number: 367&&& (relative ack number)
&&& Header length: 20 bytes
&&& Flags: 0x010 (ACK)
&&& Window size value: 255
&&& [Calculated window size: 65280]
&&& [Window size scaling factor: 256]
&&& Checksum: 0x3436 [validation disabled]
&&& [SEQ/ACK analysis]
;&& &4 次挥手的最后一步, 客户端向服务器的 ACK 包。从此便不再联系了.
0000& f0 4d a2 31 48 1f 00 1a a0 8d 1d 7f 08 00 45 00&& .M.1H.........E.
01 a0 40 00 80 06 70 f3 c0 a8 03 6e c0 a8&& .(..@...p....n..
e 04 be 00 50 a1 27 74 d8 54 9b 82 b9 50 10&& .~...P.'t.T...P.
0030& 00 ff 34 36 00 00 00 00 00 00 00 00&&&&&&&&&&&&&& ..46........
版权声明:本文为博主原创文章,未经博主允许不得转载。
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:266965次
积分:4813
积分:4813
排名:第2912名
原创:246篇
评论:46条
(7)(1)(6)(8)(1)(7)(6)(4)(1)(9)(5)(4)(3)(8)(6)(18)(9)(8)(2)(4)(8)(9)(7)(14)(5)(5)(2)(2)(5)(1)(4)(3)(3)(5)(2)(3)(7)(5)(4)(6)(2)(11)(4)(2)(2)(12)(1)(1)(1)(1)}

我要回帖

更多关于 fragment offset 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信