| |
�������������� �������� �������������� ����� ������������� � Internet ���������� �����, � ������ ������, ������������� � ���� ��������� ������������ �������. �������������, �� ������ ������������ ����������, ��� ��������� ���������� Internet ��������� ����� ����� ��������� ��������� � �������������. ��� �� �����, ��� ���������� ������ ������ ������������ ����������� ����� �����, � ���, ����� ������������� , ��� ��� ��� �������������� ������ ������� ����������. ������ ����� ��������� ��������� � ��������, ������������ ��� ���� ����������.
Internet �������� ���������������, � ����� �������, � ��������� �����, � � ������ - � ���������� ����� �������� ������ ��� ���������� ����������. � ���������� �������� ����� �������� ������ ��� ���������� ��������� (��� ���� ��������� ����������� �����) �� ����� �������� "�������������", ��������� ��� ���������� Internet ������ ��� ����� �����. ��������� Internet �������� - ��� �������� ������ � ������������, �� � ���������� ����� ������� �� �������� ������� ��������� ����������� ������� ������, ��� ������������ ������������ �������� ���������, � �������������, ������ ����� ������������� Internet ��������� �������� ������� ��� ����������, ����������� ��� ������������� ���������� �������.
������ ���������� � ����������� �������
��� ������� �������, ����������� ����, ������������� ������� ������������ � ������� � Internet ���������� (������ "=>" �������� ������������ ��������).
SEND(src,dst,prot,TOS,TTL,BufPTR,len,Id,DF,opt => result)
���
| src | ����� ����������� |
| dst | ����� ���������� |
| prot | �������� |
| TOS | ��� ������� |
| TTL | ����� ����� |
| BufPTR | ��������� ������ |
| len | ����� ������ � ������ |
| Id | ������������� |
| DF | ������ ������������ |
| opt | ����� |
| result | �����: |
| Ok - �������� ������� ���������� | |
| Error - ������ � ���������� ������� ��� � ��������� ���� |
�������, ��� ��� ������� TOS �������� ���������, � ���������� ������������ ���������� � �������� �����.
RECV(BufPTR,prot => result,src,dst,TOS,len,opt)
| BufPTR | ��������� ������ |
| prot | �������� |
| result | �����: |
| Ok - �������� ��������� ���������� | |
| Error - ������ � ���������� | |
| len | ����� ������ |
| src | ����� ����������� |
| dst | ����� ���������� |
| TOS | ��� ������� |
| opt | ����� |
����� ������������ ���������� ����������, �� ������������ SEND �����, �������������� ����� �����������. ������ Internet ��������� �� ��������� ����� ������ ��������� ���������, �������������� � ���������� ���������. ���� ��������� � �������, � ���������� ������� ��������� �����, �� ����� ����������� �������. ���� �� ��������� ������� ��� ���������� �� ������� ��������� �����, �� ����� ����������� � �������. � ��������� ������ ������ ���� ������ ��������������� ����� � ������� ��������, ������ ������ ����� ������� ��������� ��� � ���������� �����������.
� ������, ����� ���������� �������� �� ������ Internet ��������� �� ��������� ����, ����� �������������� ��������� �� RECV ����� �� ������������ - ��������, � ����� � �� ��������������. � ������ ������ ��������� ����� ��������������� �������� ���������� �� ���������� � ������������. �� ������ ������ ������������ - �������� ���������� ����������� � ������ ��� ����������. ���� ������������ - ������� �� ������������, ����������� ������������ ICMP ��������� �� ������, � �������� ������ �����������.
����������� ������������ ����� ���� ��������� ����� ���������������� ��� � ������� ������������ ��������� � ������������ � ���������� ������������ ��������, �������������� ������ ����������.
��������� ������������� ������ RECV ����� ���� ���������� ������������ ������ ����� ����������� ��� �� �� ����� ���� �������� �� ��������� ��������������� ����������.
����� ����������� ���������� � ������ �� �������, ���� ������������ ���������� ����-��������� ����� ��������� ������� (��������� ���������� ���������� ��� �� ����� ���������� �������). Internet ������ ������ ������� �� ���, ����� ����� ������������ ��� ����� �� ����������� ������� ��� ������� �����.
���������� ��������� ����� ��������� ��� ���� ��������� ���������� ������� � Internet ������ ��� ����������� ������������������, ��� ��, ��������, ������������� ������������� ������-���� ������ ��������� (�.�. ���� ���������, ������� ����� � ���� ��������� ������������ ��������).
������ ����� ������������� ������� ���������� ����� ������������� � Internet ����������. ������������ ����������� ���������� ����������� �������� ������� ������� �� ������ �������� ������, ������ ������ ������ ��������� � Internert ���������� �� �������� �������� ��� �������� �� ������������ ���� ������� (�.�. SVC, UUO, EMT), ��� ��� ����� ������ ����� ������� ����� ����������.
���������� �: ������� � ��������
������ 1
������ ����������� Internet ����������, ������� ������
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ver=4 | IHL=5 |Type of Service| Total Length = 21 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification = 111 |Flg=0| Fragment Offset = 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Time =123 | Protocol =1 | Header Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+
���. 5 ������ Internet ����������
������ ����� �������� ����� ��� ������ ����. ����� ��������� Internet ���������� ������ 4 Internet ���������. Internet ��������� ������� �� ���� 32 ������ ����, � ����� ����� ���������� ���������� 21 �����. ������ ���������� �������� ����������� ����������� (� �� ����������).
������ 2
� ������ ������� �� ���������� ������ Internet ���������� �������������� ������� (452 ������ ������), � ����� ��� Internet ���������, ������� ����� �� ���������� ��� ������������ �������� ���������� � ������, ����� ������������ ���������� ������� ��������� ���������� 280 �������.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ver=4 | IHL=5 |Type of Service| Total Length = 472 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification = 111 |Flg=0| Fragment Offset = 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Time =123 | Protocol =6 | Header Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | \ \ \ \ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
���. 6 ������ Internet ����������
������ �������� ������ ��������, ������� ��������� ��� ����������� �������� ���������� �� ������� ����� 256 ������ ������.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ver=4 | IHL=5 |Type of Service| Total Length = 276 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification = 111 |Flg=1| Fragment Offset = 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Time =119 | Protocol =6 | Header Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | \ \ \ \ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
���. 7 ������ Internet ���������
� ������ ��������
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ver=4 | IHL=5 |Type of Service| Total Length = 216 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification = 111 |Flg=0| Fragment Offset = 32 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Time =119 | Protocol =6 | Header Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | \ \ \ \ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
���. 8 ������ Internet ���������
������ 3
����� �� ���������� ������, ����� ���������� ����� �����
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ver=4 | IHL=8 |Type of Service| Total Length = 576 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification = 111 |Flg=0| Fragment Offset = 32 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Time =123 | Protocol =6 | Header Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Opt. Code = x | Opt. len. = 3 | option value | Opt. Code = x | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Opt. len. = 4 | option value | Opt. Code = 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Opt. Code = y | Opt. len. = 3 | option value | Opt. Code = 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | \ \ \ \ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
���. 9 ������ Internet ����������