Ŀ      ¼

ǰ
1   	1
1.1   	1
1.2   Դʾ	1
1.2.1   ӵΪ1	1
1.2.2   ӡˢԼ	2
1.3   ʷ	2
1.4   Ӧñ̽ӿ	3
1.5   ʾ	4
1.6   ϵͳúͿ⺯	6
1.7   ʵָ	6
1.8   	7
1.9   mbuf	11
1.9.1   ڵַṹmbuf	11
1.9.2   ݵmbuf	12
1.9.3   IPUDPײ	13
1.9.4   IP	14
1.9.5   ̫	14
1.9.6   UDPС	14
1.10   봦	15
1.10.1   ̫	15
1.10.2   IP	15
1.10.3   UDP	16
1.10.4   	17
1.11   ʵָ()	17
1.12   жϼ벢	18
1.13   Դ֯	20
1.14   	21
1.15   С	22
2   mbuf洢	24
2.1   	24
2.2   	27
2.2.1   ȫֱ	27
2.2.2   ͳ	28
2.2.3   ںͳ	28
2.3   mbufĶ	29
2.4   mbufṹ	29
2.5   򵥵mbufͺ	31
2.5.1   m_get	32
2.5.2   MGET	32
2.5.3   m_retry	33
2.5.4   mbuf	34
2.6   m_devgetm_pullup	34
2.6.1   m_devget	34
2.6.2   mtoddtom	36
2.6.3   m_pullupЭײ	36
2.6.4   m_pullupIPķƬ	37
2.6.5   TCPm_pullup	39
2.6.6   m_pullupʹܽ	40
2.7   mbufͺС	40
2.8   Net/3ݽṹС	42
2.9   m_copyʹü	43
2.10   ѡ	47
2.11   С	47
3   ӿڲ	49
3.1   	49
3.2   	49
3.2.1   ȫֱ	49
3.2.2   SNMP	50
3.3   ifnetṹ	51
3.4   ifaddrṹ	57
3.5   sockaddrṹ	58
3.6   ifnetifaddrרû	59
3.7   ʼ	60
3.8   ̫ʼ	61
3.9   SLIPʼ	64
3.10   سʼ	65
3.11   if_attach	66
3.12   ifinit	72
3.13   С	73
4   ӿڣ̫	74
4.1   	74
4.2   	75
4.2.1   ȫֱ	75
4.2.2   ͳ	75
4.2.3   SNMP	76
4.3   ̫ӿ	77
4.3.1   leintr	79
4.3.2   leread	79
4.3.3   ether_input	81
4.3.4   ether_output	84
4.3.5   lestart	87
4.4   ioctlϵͳ	89
4.4.1   ifioctl	90
4.4.2   ifconf	91
4.4.3   	94
4.4.4   ͨýӿioctl	95
4.4.5   if_downif_up	96
4.4.6   ̫SLIPͻ	97
4.5   С	98
5   ӿڣSLIPͻ	100
5.1   	100
5.2   	100
5.2.1   ȫֱ	100
5.2.2   ͳ	101
5.3   SLIPӿ	101
5.3.1   SLIP·̣SLIPDISC	101
5.3.2   SLIPʼslopenslinit	103
5.3.3   SLIP봦slinput	105
5.3.4   SLIPsloutput	109
5.3.5   slstart	111
5.3.6   SLIP鶪ʧ	116
5.3.7   SLIPܿ	117
5.3.8   slclose	117
5.3.9   sltioctl	118
5.4   ؽӿ	119
5.5   С	121
6   IPַ	123
6.1   	123
6.1.1   IPַ	123
6.1.2   IPַӡˢ涨	123
6.1.3   ·	124
6.2   	125
6.3   ӿں͵ַС	125
6.4   sockaddr_inṹ	126
6.5   in_ifaddrṹ	127
6.6   ַָ	128
6.6.1   ifioctl	130
6.6.2   in_control	130
6.6.3   ǰSIOCSIFADDR
           SIOCSIFNETMASK
           SIOCSIFDSTADDR	132
6.6.4   ַָɣSIOCSIFADDR	133
6.6.5   in_ifinit	133
6.6.6   ָɣSIOCSIFNETMASK	136
6.6.7   ĿĵַָɣSIOCSIFDSTADDR	137
6.6.8   ȡӿϢ	137
6.6.9   ÿӿڶIPַ	138
6.6.10   IPַSIOCAIFADDR	139
6.6.11   ɾIPַSIOCDIFADDR	140
6.7   ӿioctl	141
6.7.1   leioctl	141
6.7.2   slioctl	142
6.7.3   loioctl	143
6.8   Internetʵú	144
6.9   ifnetʵú	144
6.10   С	145
7   Э	146
7.1   	146
7.2   	146
7.2.1   ȫֱ	147
7.2.2   ͳ	147
7.3   domainṹ	147
7.4   protoswṹ	148
7.5   IP domainprotoswṹ	150
7.6   pffindprotopffindtype	155
7.7   pfctlinput	157
7.8   IPʼ	157
7.8.1   Internet	157
7.8.2   ip_init	158
7.9   sysctlϵͳ	159
7.10   С	161
8   IPЭ	162
8.1   	162
8.2   	163
8.2.1   ȫֱ	163
8.2.2   ͳ	163
8.2.3   SNMP	164
8.3   IP	165
8.4   봦ipintr	167
8.4.1   ipintrŹ	167
8.4.2   ֤	168
8.4.3   תת	171
8.4.4   װͷ	173
8.5   תip_forward	174
8.6   ip_output	180
8.6.1   ײʼ	181
8.6.2   ·ѡ	182
8.6.3   ԴַѡͷƬ	184
8.7   Internetͣin_cksum	186
8.8   setsockoptgetsockoptϵͳ	190
8.8.1   PRCO_SETOPTĴ	192
8.8.2   PRCO_GETOPTĴ	193
8.9   ip_sysctl	193
8.10   С	194
9   IPѡ	196
9.1   	196
9.2   	196
9.2.1   ȫֱ	196
9.2.2   ͳ	197
9.3   ѡʽ	197
9.4   ip_dooptions	198
9.5   ¼·ѡ	200
9.6   Դվͼ¼·ѡ	202
9.6.1   save_rte	205
9.6.2   ip_srcroute	206
9.7   ʱѡ	207
9.8   ip_insertoptions	210
9.9   ip_pcbopts	214
9.10   һЩ	217
9.11   С	217
10   IPķƬװ	218
10.1   	218
10.2   	219
10.2.1   ȫֱ	220
10.2.2   ͳ	220
10.3   Ƭ	220
10.4   ip_optcopy	223
10.5   װ	224
10.6   ip_reass	227
10.7   ip_slowtimo	237
10.8   С	238
11   ICMPInternetƱЭ	239
11.1   	239
11.2   	242
11.2.1   ȫֱ	242
11.2.2   ͳ	242
11.2.3   SNMP	243
11.3   icmpṹ	244
11.4   ICMP protoswṹ	245
11.5   봦icmp_input	246
11.6   	249
11.7   	251
11.7.1   ѯʣICMP_ECHO
             ICMP_ECHOREPLY	252
11.7.2   ʱѯʣICMP_TSTAMP
             ICMP_TSTAMPREPLY	253
11.7.3   ַѯʣICMP_MASKREQ
             ICMP_MASKREPLY	253
11.7.4   ϢѯʣICMP_IREQICMP_
             IREQREPLY	255
11.7.5   ·֣ICMP_ROUTERADVERT
             ICMP_ROUTERSOLICIT	255
11.8   ض	255
11.9   ش	257
11.10   	257
11.11   icmp_error	258
11.12   icmp_reflect	261
11.13   icmp_send	265
11.14   icmp_sysctl	266
11.15   С	266
12   IPಥ	268
12.1   	268
12.2   	269
12.2.1   ȫֱ	270
12.2.2   ͳ	270
12.3   ̫ಥַ	270
12.4   ether_multiṹ	271
12.5   ̫ಥ	273
12.6   in_multiṹ	273
12.7   ip_moptionsṹ	275
12.8   ಥĲѡ	276
12.9   ಥTTLֵ	277
12.9.1   MBONE	278
12.9.2   չ	278
12.10   ip_setmoptions	278
12.10.1   ѡһȷĶಥӿڣIP_
               MULTICAST_IF	280
12.10.2   ѡȷĶಥTTL: IP_ 
               MULTICAST_TTL	281
12.10.3   ѡಥأIP_MULTICAST_
               LOOP	281
12.11   һIPಥ	282
12.11.1   in_addmulti	285
12.11.2   slioctlloioctlSIOCADDMULTISIOCDELMULTI	287
12.11.3   leioctlSIOCADDMULTI
               SIOCDELMULTI	288
12.11.4   ether_addmulti	288
12.12   뿪һIPಥ	291
12.12.1   in_delmulti	292
12.12.2   ether_delmulti	293
12.13   ip_getmoptions	295
12.14   ಥ봦ipintr	296
12.15   ಥip_output	298
12.16   ܵĿ	301
12.17   С	301
13   IGMPInternetЭ	303
13.1   	303
13.2   	304
13.2.1   ȫֱ	304
13.2.2   ͳ	304
13.2.3   SNMP	305
13.3   igmpṹ	305
13.4   IGMPprotoswĽṹ	306
13.5   һ飺igmp_joingroup	306
13.6   igmp_fasttimo	308
13.7   봦igmp_input	311
13.7.1   ԱϵѯIGMP_HOST_
             MEMBERSHIP_QUERY	312
13.7.2   Աϵ棺IGMP_HOST_
             MEMBERSHIP_REPORT	313
13.8   뿪һ飺igmp_leavegroup	314
13.9   С	315
14   IPಥѡ·	316
14.1   	316
14.2   	316
14.2.1   ȫֱ	316
14.2.2   ͳ	317
14.2.3   SNMP	317
14.3   ಥ()	317
14.4   mroutedػ	318
14.5   ӿ	321
14.5.1   ӿڱ	322
14.5.2   add_vif	324
14.5.3   del_vif	326
14.6   IGMP()	327
14.6.1   add_lgrp	328
14.6.2   del_lgrp	329
14.6.3   grplst_member	330
14.7   ಥѡ·	331
14.7.1   ಥѡ·	334
14.7.2   del_mrt	335
14.7.3   add_mrt	336
14.7.4   mrtfind	337
14.8   ಥתip_mforward	338
14.8.1   phyint_send	343
14.8.2   tunnel_send	344
14.9   ip_mrouter_done	345
14.10   С	346
15   ڲ	348
15.1   	348
15.2   	349
15.3   socketṹ	349
15.4   ϵͳ	354
15.4.1   	355
15.4.2   ϵͳС	355
15.5   ̡Ͳ	357
15.6    socketϵͳ	358
15.6.1   socreate	359
15.6.2   ûȨ	361
15.7    getsocksockargs	361
15.8    bindϵͳ	363
15.9    listenϵͳ	364
15.10   tsleepwakeup	365
15.11   acceptϵͳ	366
15.12   sonewconnsoisconnected
	369
15.13   connectϵͳ	372
15.13.1   soconnect	374
15.13.2   жӲںⲿַ
	375
15.14   shutdownϵͳ	375
15.15   closeϵͳ	377
15.15.1   soo_close	377
15.15.2   soclose	378
15.16   С	380
16   I/O	381
16.1   	381
16.2   	381
16.3   ڻ	381
16.4   writewritevsendtosendmsg
ϵͳ	384
16.5   sendmsgϵͳ	387
16.6   sendit	388
16.6.1   uiomove	389
16.6.2   	390
16.6.3   sendit	391
16.7   sosend	392
16.7.1   ɿЭ黺	393
16.7.2   ɿЭ黺	393
16.7.3   sosendС	401
16.7.4   	401
16.8   readreadvrecvfromrecvmsg
         ϵͳ	401
16.9   recvmsgϵͳ	402
16.10   recvit	403
16.11   soreceive	405
16.11.1   	406
16.11.2   	406
16.11.3   Ľղѡ	407
16.11.4   ջ֯ı߽	407
16.11.5   ջ֯ûбı߽	408
16.11.6   Ϣʹ	409
16.12   soreceive	410
16.13   selectϵͳ	421
16.13.1   selscan	425
16.13.2   soo_select	425
16.13.3   selrecord	427
16.13.4   selwakeup	428
16.14   С	429
17   ѡ	431
17.1   	431
17.2   	431
17.3   setsockoptϵͳ	432
17.4   getsockoptϵͳ	437
17.5   fcntlioctlϵͳ	440
17.5.1   fcntl	441
17.5.2   ioctl	443
17.6   getsocknameϵͳ	444
17.7   getpeernameϵͳ	445
17.8   С	447
18   Radix·ɱ	448
18.1   	448
18.2   ·ɱṹ	448
18.3   ѡ·	456
18.4   	456
18.4.1   ȫֱ	458
18.4.2   ͳ	458
18.4.3   SNMP	459
18.5   Radixݽṹ	460
18.6   ѡ·ṹ	463
18.7   ʼroute_initrtable_init
	465
18.8   ʼrn_initrn_inithead
	468
18.9   ظб	471
18.10   rn_match	473
18.11   rn_search	480
18.12   С	481
19   ѡ·ѡ·Ϣ	482
19.1   	482
19.2   rtallocrtalloc1	482
19.3   RTFREErtfree	484
19.4   rtrequest	486
19.5   rt_setgate	491
19.6   rtinit	493
19.7   rtredirect	495
19.8   ѡ·ϢĽṹ	498
19.9   rt_missmsg	501
19.10   rt_ifmsg	503
19.11   rt_newaddrmsg	504
19.12   rt_msg1	505
19.13   rt_msg2	507
19.14   sysctl_rtable	510
19.15   sysctl_dumpentry	514
19.16   sysctl_iflist	515
19.17   С	517
20   ѡ·	518
20.1   	518
20.2   routedomainprotoswṹ	518
20.3   ѡ·ƿ	519
20.4   raw_init	520
20.5   route_output	520
20.6   rt_xaddrs	530
20.7   rt_setmetrics	531
20.8   raw_input	532
20.9   route_usrreq	534
20.10   raw_usrreq	535
20.11   raw_attachraw_detachraw_disconnect	539
20.12   С	540
21   ARPַЭ	542
21.1   	542
21.2   ARP·ɱ	542
21.3   	544
21.3.1   ȫֱ	544
21.3.2   ͳ	544
21.3.3   SNMP	546
21.4   ARPṹ	546
21.5   arpwhohas	548
21.6   arprequest	548
21.7   arpintr	551
21.8   in_arpinput	552
21.9   ARPʱ	557
21.9.1   arptimer	557
21.9.2   arptfree	557
21.10   arpresolve	558
21.11   arplookup	562
21.12   ARP	563
21.13   arp_rtrequest	564
21.14   ARPͶಥ	569
21.15   С	570
22   Эƿ	572
22.1   	572
22.2   	573
22.2.1   ȫֱ	574
22.2.2   ͳ	574
22.3   inpcbĽṹ	574
22.4   in_pcballocin_pcbdetach	575
22.5   󶨡Ӻͷ	577
22.6   in_pcblookup	581
22.7   in_pcbbind	584
22.8   in_pcbconnect	589
22.9   in_pcbdisconnect	594
22.10   in_setsockaddrin_setpeeraddr
	595
22.11   in_pcbnotifyin_rtchangein_losing	595
22.11.1   in_rtchange	598
22.11.2   ضԭʼ	599
22.11.3   ICMPUDP	600
22.11.4   in_losing	601
22.12   ʵ	602
22.13   С	602
23   UDPûݱЭ	605
23.1   	605
23.2   	605
23.2.1   ȫֱ	606
23.2.2   ͳ	606
23.2.3   SNMP	607
23.3   UDP protoswṹ	607
23.4   UDPײ	608
23.5   udp_init	609
23.6   udp_output	609
23.6.1   ǰIP/UDPײmbuf	612
23.6.2   UDPͼαײ	612
23.7   udp_input	616
23.7.1   յUDPݱһȷ	616
23.7.2   õݱ	619
23.7.3   öಥ͹㲥ݱ	622
23.7.4   ϵUDPںͶӿ	625
23.8   udp_saveopt	625
23.9   udp_ctlinput	627
23.10   udp_usrreq	628
23.11   udp_sysctl	633
23.12   ʵ	633
23.12.1   UDP PCBٻ	633
23.12.2   UDP	634
23.13 С	635
24   TCPЭ	636
24.1   	636
24.2   	636
24.2.1   ȫֱ	636
24.2.2   ͳ	637
24.2.3   SNMP	640
24.3   TCP protoswṹ	641
24.4   TCPײ	641
24.5   TCPĿƿ	643
24.6   TCP״̬Ǩͼ	645
24.7   TCP	646
24.8   tcp_init	650
24.9   С	652
25   TCPĶʱ	654
25.1   	654
25.2   	655
25.3   tcp_canceltimers	657
25.4   tcp_fasttimo	657
25.5   tcp_slowtimo	658
25.6   tcp_timers	659
25.6.1   FIN_WAIT_22MSLʱ	660
25.6.2   ʱ	662
25.6.3   ӽʱͱʱ	662
25.7   شʱļ	665
25.8   tcp_newtcpcb㷨	666
25.9   tcp_setpersist	668
25.10   tcp_xmit_timer	669
25.11   شʱtcp_timers	673
25.11.1   𶯺ͱӵ	675
25.11.2   ȷ	677
25.12   һRTT	677
25.13   С	679
26   TCP	680
26.1   	680
26.2   tcp_output	680
26.3   ǷӦһĶ	682
26.4   TCPѡ	691
26.5   ڴСѡ	 692
26.6   ʱѡ	692
26.6.1   ĸʱҪԣRFC1323
㷨	694
26.6.2   ĸʱҪԣȷ
㷨	695
26.6.3   ʱӳACK	695
26.7   һĶ	696
26.8   tcp_template	707
26.9   tcp_respond	708
26.10   С	710
27   TCPĺ	712
27.1   	712
27.2   tcp_drain	712
27.3   tcp_drop	712
27.4   tcp_close	713
27.4.1   ·	713
27.4.2   Դͷ	716
27.5   tcp_mss	717
27.6   tcp_ctlinput	722
27.7   tcp_notify	723
27.8   tcp_quench	724
27.9   TCP_REASStcp_reass	724
27.9.1   TCP_REASS	725
27.9.2   tcp_reass	727
27.10   tcp_trace	732
27.11   С	736
28   TCP	737
28.1   	737
28.2   Ԥ	739
28.3   tcp_dooptions	745
28.4   ײԤ	747
28.5   TCP룺ִ·	752
28.6   ɱ򿪻	752
28.6.1   ɱ	753
28.6.2   	756
28.7   PAWSֹŻ	760
28.8   üĶʹڴ	762
28.9   Ӻͬʱ	768
28.10   ¼ʱ	770
28.11   RST	770
28.12   С	772
29   TCP()	773
29.1   	773
29.2   ACK	773
29.3   ɱ򿪺ͬʱ	774
29.4   شͿٻָ㷨	775
29.5   ACK	778
29.6   ´Ϣ	784
29.7   ʽ	786
29.8   tcp_pulloutofband	788
29.9   ѽյ	789
29.10   FIN	791
29.11   Ĵ	793
29.12   ʵ	795
29.13   ײѹ	795
29.13.1   	796
29.13.2   ײֶεѹ	799
29.13.3   	801
29.13.4   ʵ	802
29.13.5   	803
29.14   С	803
30   TCPû	805
30.1   	805
30.2   tcp_usrreq	805
30.3   tcp_attach	814
30.4   tcp_disconnect	815
30.5   tcp_usrclosed	816
30.6   tcp_ctloutput	817
30.7   С	820
31   BPFBSD ˳	821
31.1   	821
31.2   	821
31.2.1   ȫֱ	821
31.2.2   ͳ	822
31.3   bpf_ifṹ	822
31.4   bpf_dṹ	825
31.4.1   bpfopen	826
31.4.2   bpfioctl	827
31.4.3   bpf_setif	830
31.4.4   bpf_attachd	831
31.5   BPF	832
31.5.1   bpf_tap	832
31.5.2   catchpacket	833
31.5.3   bpfread	835
31.6   BPF	837
31.7   С	838
32   ԭʼIP	839
32.1   	839
32.2   	839
32.2.1   ȫֱ	839
32.2.2   ͳ	840
32.3   ԭʼ IPprotoswṹ	840
32.4   rip_init	842
32.5   rip_input	842
32.6   rip_output	844
32.7   rip_usrreq	846
32.8   rip_ctloutput	850
32.9   С	852
	853
¼A   ϰĽ	854
¼B   ԴĻȡ	872
¼C   RFC 1122 й	874
ο	895
