Windows отправка udp пакета

Windows отправка udp пакета

[SSH]
sequence = 12345:tcp,54321:udp
seq_timeout = 20
tcpflags = syn
start_command = /sbin/iptables -I INPUT -s %IP% -p tcp —dport ssh -j ACCEPT
cmd_timeout = 30
stop_command = /sbin/iptables -D INPUT -s %IP% -p tcp —dport ssh -j ACCEPT

[FTP]
sequence = 12345:udp,54321:tcp
seq_timeout = 20
tcpflags = syn
start_command = /sbin/iptables -I INPUT -s %IP% -p tcp —dport 21 -j ACCEPT
cmd_timeout = 30
stop_command = /sbin/iptables -D INPUT -s %IP% -p tcp —dport 21 -j ACCEPT

�������, ��� ����� ���� ������� ��� tcp ����� � ��������� �� ����� telnet, �� ��� ��������� ���� ��������. ��� ������������ ����� ������� ���� (������������) � ����� �� ��� Win7, ��� �� ������� �� ����� telnet ������, ��� � �������� . 26 ��� 11, 11:35����[11500954] �������� | ���������� �������� ����������

Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
bremborg
Member

������:
���������: 145

������� ���� (������������) �� ����� �������� TCP/UDP ������� ��� ��� ?

� ��� ���� ������ ���������� � ��������������, �������:

ALex_hha
��� ���� �������� �� ���� 12345 �������� tcp � ����� �� ���� 54321 �������� udp � ������� 20 ���

� ������� ������ �� 20 �����. ������������ ���������� indy (��������� ��� 5 �����).

26 ��� 11, 12:11����[11501348] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
bremborg
Member

������:
���������: 145

� ������� ������� ��� UDP ���� �.�. � ������ �������.
26 ��� 11, 12:15����[11501406] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
Dimitry Sibiryakov
Member

������:
���������: 52921

ALex_hha
��� ����� ������ ������ � SSH �� 30 ���

������� �������� ������ ��� ����, ����� ����� ���� ������������ SSH ������ � ����������
������������? �������� ������, ��� ����������� ���.

Posted via ActualForum NNTP Server 1.4

26 ��� 11, 12:26����[11501575] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
ALex_hha
Member

������: �������. �������.
���������: 2944

�����
������� ���� (������������) �� ����� �������� TCP/UDP ������� ��� ��� ?

php/html ������������ 😀

�����
� ������� ������ �� 20 �����. ������������ ���������� indy (��������� ��� 5 �����).

�� �������� �� � � ��� ���� �� �++ builder, ������ ��� ������ � ������� ���������. �� � ������ �� ����, � knockd ���� ���� ������ � ��� �����, ������ ����� ������� ��� ���� ����� ������ ����� ��� ����, ��� ��������� ��������

�����
������� �������� ������ ��� ����, ����� ����� ���� ������������ SSH ������ � ����������
������������?

��� ��� ���� ������ ��� ����������� ��� ������� 😉 �������������� ����� �� ssh

�����
�������� ������, ��� ����������� ���.

� �� ��� ���������� �� �������

26 ��� 11, 13:12����[11502209] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
Dimitry Sibiryakov
Member

������:
���������: 52921

ALex_hha
� �� ��� ���������� �� �������

���� ��� �������� ��������?

Posted via ActualForum NNTP Server 1.4

26 ��� 11, 13:19����[11502286] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
ALex_hha
Member

������: �������. �������.
���������: 2944

���� ���� ������ � OpenSSH_4.3p2 (CentOS-5.7). ���� �� ��� ����� ������ ���� ����� 1 ���, � ���� ���� ����� ������� 😀
26 ��� 11, 14:20����[11502937] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
Dimitry Sibiryakov
Member

������:
���������: 52921

ALex_hha
���� �� ��� ����� ������ ���� ����� 1 ���, � ���� ���� ����� ������� 😀

����� �����? ���� �� �������, ��� ��� � ������� �� ���������� ���, � �� ��������� �� ��������.

Posted via ActualForum NNTP Server 1.4

26 ��� 11, 14:39����[11503096] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
ALex_hha
Member

������: �������. �������.
���������: 2944

�����
��� ����� ������ ������ � SSH �� 30 ���

��������� ������ �������� FTP, � ������ ��������� ��� �� ������� ��� ������������� ip, �� ������������ ���������� �������

26 ��� 11, 14:52����[11503217] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
Dimitry Sibiryakov
Member

������:
���������: 52921

ALex_hha
��������� ������ �������� FTP, � ������ ��������� ��� �� ������� ��� ������������� ip, ��
������������ ���������� �������

����� � �� ��-���� ����������� SSH-�������. ������������� � SSH-�������, ��������� ������
���� FTP. ������������ — ��, ��� �������� FTP. Putty, ��������, ����� ������ �����
������������� socks-proxy, ����� ������� ����� ������ ����������� ����� ��������� ������.
��� �������� FTP ������� ���������� ������� ����� ��������� �������������� port-mapping.

Posted via ActualForum NNTP Server 1.4

26 ��� 11, 15:16����[11503477] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
The Dim!
Member

������: �. ��������
���������: 2171

��������� � �������. �� �� ����� ������������ ��� ���������� «����» ��� �������� �����. �� ����� ��� ��������� ��� ����������.
����� ��� � ���. �������� ����������(� ������������������) ������� ������� ����������� �����, �� ������� ����������� ����������. ���� ����� ������������������ ����, �� ������ «�����» ��������� �����-�� ����(�) �������� �������.
��� ������� ����� ������ ������ ��� ������ ������.
26 ��� 11, 15:25����[11503579] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
Dimitry Sibiryakov
Member

������:
���������: 52921

The Dim!
�� ����� ������������ ��� ���������� «����» ��� �������� �����.

�� ���-�� �������. ��� ������ ������ ����. �������� ������������.

Posted via ActualForum NNTP Server 1.4

26 ��� 11, 15:47����[11503847] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
The Dim!
Member

������: �. ��������
���������: 2171

Dimitry Sibiryakov
The Dim!
�� ����� ������������ ��� ���������� «����» ��� �������� �����.

�� ���-�� �������. ��� ������ ������ ����. �������� ������������.

������ «�������� ����������», ��������.

26 ��� 11, 15:50����[11503875] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
Dimitry Sibiryakov
Member

������:
���������: 52921

The Dim!
�������� ���������� ��� «�����» �������� ������.

���� ����� ����������. ����, �������, �� ������ ������ ���������� � ���� �������.

Posted via ActualForum NNTP Server 1.4

26 ��� 11, 15:54����[11503919] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
The Dim!
Member

������: �. ��������
���������: 2171

Dimitry Sibiryakov
The Dim!
�������� ���������� ��� «�����» �������� ������.

���� ����� ����������. ����, �������, �� ������ ������ ���������� � ���� �������.

tcpdump � ��� ��� ������ 🙂
�� ��� ������� ���� �� ������� �� ���� ����������� �������.

26 ��� 11, 16:32����[11504291] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
aleks2
Guest
bremborg
� ������� ������� ��� UDP ���� �.�. � ������ �������.

Win32 API
The Windows Sockets socket function creates a socket which is bound to a specific service provider.

int af,
int type,
int protocol
);

[in] An address family specification.

[in] A type specification for the new socket.

[in] A particular protocol to be used with the socket which is specific to the indicated address family.

The socket function causes a socket descriptor and any related resources to be allocated and bound to a specific transport service provider. Windows Sockets will utilize the first available service provider that supports the requested combination of address family, socket type and protocol parameters. Note that the socket created will have the overlapped attribute. Sockets without the overlapped attribute can only be created by using WSASocket.

Note The manifest constant AF_UNSPEC continues to be defined in the header file but its use is strongly discouraged, as this can cause ambiguity in interpreting the value of the protocol parameter.

The following are the only two type specifications supported for Windows Sockets 1.1:

Type Explanation
SOCK_STREAM Provides sequenced, reliable, two-way, connection-based byte streams with an out-of-band data transmission mechanism. Uses TCP for the Internet address family.
SOCK_DGRAM Supports datagrams, which are connectionless, unreliable buffers of a fixed (typically small) maximum length. Uses UDP for the Internet address family.

In Windows Sockets 2, many new socket types will be introduced. However, since an application can dynamically discover the attributes of each available transport protocol through the WSAEnumProtocols function, the various socket types need not be called out in the API specification. Socket type definitions will appear in WINSOCK2.H which will be periodically updated as new socket types, address families and protocols are defined.
Connection-oriented sockets such as SOCK_STREAM provide full-duplex connections, and must be in a connected state before any data can be sent or received on it. A connection to another socket is created with a connect call. Once connected, data can be transferred using send and recv calls. When a session has been completed, a closesocket must be performed.

The communications protocols used to implement a reliable, connection-oriented socket ensure that data is not lost or duplicated. If data for which the peer protocol has buffer space cannot be successfully transmitted within a reasonable length of time, the connection is considered broken and subsequent calls will fail with the error code set to WSAETIMEDOUT.
Connectionless, message-oriented sockets allow sending and receiving of datagrams to and from arbitrary peers using sendto and recvfrom. If such a socket is connected to a specific peer, datagrams can be sent to that peer using send and can be received only from this peer using recv.

Support for sockets with type RAW is not required, but service providers are encourage to support raw sockets whenever it makes sense to do so.

If no error occurs, socket returns a descriptor referencing the new socket. Otherwise, a value of INVALID_SOCKET is returned, and a specific error code can be retrieved by calling WSAGetLastError.

WSANOTINITIALISED A successful WSAStartup must occur before using this function.
WSAENETDOWN The network subsystem or the associated service provider has failed.
WSAEAFNOSUPPORT The specified address family is not supported.
WSAEINPROGRESS A blocking Windows Sockets 1.1 call is in progress, or the service provider is still processing a callback function.
WSAEMFILE No more socket descriptors are available.
WSAENOBUFS No buffer space is available. The socket cannot be created.
WSAEPROTONOSUPPORT The specified protocol is not supported.
WSAEPROTOTYPE The specified protocol is the wrong type for this socket.
WSAESOCKTNOSUPPORT The specified socket type is not supported in this address family.

accept, bind, connect, getsockname, getsockopt, ioctlsocket, listen, recv, recvfrom, select, send, sendto, setsockopt, shutdown, WSASocket

26 ��� 11, 17:48����[11504886] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
ALex_hha
Member

�����
�������� ���������� ��� «�����» �������� ������.

� �� ������ �����, ��� ������� ������������� ������ ����������

26 ��� 11, 18:08����[11504991] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
ALex_hha
Member

������: �������. �������.
���������: 2944

�����
The Windows Sockets socket function creates a socket which is bound to a specific service provider

�� ��� ���� ������ ��������� �� ��� �� VS, ���� ����� �� ������� � ������ ���� ��������� � �������� ��� (��� ���������) 😀

26 ��� 11, 18:11����[11505004] �������� | ���������� �������� ����������
Re: �������� tcp/udp ������ �� ������������ ����/���� ����������� ���������� [new]
bremborg
Member

������:
���������: 145

aleks2
bremborg
� ������� ������� ��� UDP ���� �.�. � ������ �������.

Win32 API
The Windows Sockets socket function creates a socket which is bound to a specific service provider.

int af,
int type,
int protocol
);

[in] An address family specification.

[in] A type specification for the new socket.

[in] A particular protocol to be used with the socket which is specific to the indicated address family.

The socket function causes a socket descriptor and any related resources to be allocated and bound to a specific transport service provider. Windows Sockets will utilize the first available service provider that supports the requested combination of address family, socket type and protocol parameters. Note that the socket created will have the overlapped attribute. Sockets without the overlapped attribute can only be created by using WSASocket.

Note The manifest constant AF_UNSPEC continues to be defined in the header file but its use is strongly discouraged, as this can cause ambiguity in interpreting the value of the protocol parameter.

The following are the only two type specifications supported for Windows Sockets 1.1:

Type Explanation
SOCK_STREAM Provides sequenced, reliable, two-way, connection-based byte streams with an out-of-band data transmission mechanism. Uses TCP for the Internet address family.
SOCK_DGRAM Supports datagrams, which are connectionless, unreliable buffers of a fixed (typically small) maximum length. Uses UDP for the Internet address family.

In Windows Sockets 2, many new socket types will be introduced. However, since an application can dynamically discover the attributes of each available transport protocol through the WSAEnumProtocols function, the various socket types need not be called out in the API specification. Socket type definitions will appear in WINSOCK2.H which will be periodically updated as new socket types, address families and protocols are defined.
Connection-oriented sockets such as SOCK_STREAM provide full-duplex connections, and must be in a connected state before any data can be sent or received on it. A connection to another socket is created with a connect call. Once connected, data can be transferred using send and recv calls. When a session has been completed, a closesocket must be performed.

The communications protocols used to implement a reliable, connection-oriented socket ensure that data is not lost or duplicated. If data for which the peer protocol has buffer space cannot be successfully transmitted within a reasonable length of time, the connection is considered broken and subsequent calls will fail with the error code set to WSAETIMEDOUT.
Connectionless, message-oriented sockets allow sending and receiving of datagrams to and from arbitrary peers using sendto and recvfrom. If such a socket is connected to a specific peer, datagrams can be sent to that peer using send and can be received only from this peer using recv.

Support for sockets with type RAW is not required, but service providers are encourage to support raw sockets whenever it makes sense to do so.

If no error occurs, socket returns a descriptor referencing the new socket. Otherwise, a value of INVALID_SOCKET is returned, and a specific error code can be retrieved by calling WSAGetLastError.

WSANOTINITIALISED A successful WSAStartup must occur before using this function.
WSAENETDOWN The network subsystem or the associated service provider has failed.
WSAEAFNOSUPPORT The specified address family is not supported.
WSAEINPROGRESS A blocking Windows Sockets 1.1 call is in progress, or the service provider is still processing a callback function.
WSAEMFILE No more socket descriptors are available.
WSAENOBUFS No buffer space is available. The socket cannot be created.
WSAEPROTONOSUPPORT The specified protocol is not supported.
WSAEPROTOTYPE The specified protocol is the wrong type for this socket.
WSAESOCKTNOSUPPORT The specified socket type is not supported in this address family.

Читайте также:  Upgrading windows error code 0x7008007b
Оцените статью