nl:: Inet:: RAWEndPoint
#include <src/inet/RawEndPoint.h>
이 클래스의 객체는 원시 IP 네트워크 엔드포인트를 나타냅니다.
요약
Nest Inet Layer는 시스템 구성 여부에 따라 IP 네트워크 엔드포인트 (Linux 및 BSD 파생 시스템에서 SOCK_RAW 소켓) 또는 LwIP 원시 프로토콜 제어 블록과 상호작용하는 메서드를 캡슐화합니다.
상속
상속 위치: nl::Inet::IPEndPointBasis
공개 속성 |
|
---|---|
IPProto
|
IPProtocol
인터넷 제어 메시지 프로토콜 (ICMP) 버전
|
IPVer
|
IPVersion
인터넷 프로토콜 버전
|
공개 함수 |
|
---|---|
Bind(IPAddressType addrType, IPAddress addr, InterfaceId intfId)
|
엔드포인트를 인터페이스 IP 주소에 바인딩합니다.
|
BindIPv6LinkLocal(InterfaceId intf, IPAddress addr)
|
원시 엔드포인트를 지정된 인터페이스 색인의 IPv6 링크-로컬 범위 주소에 바인딩합니다.
|
BindInterface(IPAddressType addrType, InterfaceId intf)
|
엔드포인트를 네트워크 인터페이스에 결합합니다.
|
Close(void)
|
void
엔드포인트를 닫습니다.
|
Free(void)
|
void
엔드포인트를 닫고 메모리를 재활용합니다.
|
GetBoundInterface(void)
|
InterfaceId
이 엔드포인트에서 바인딩된 인터페이스를 가져옵니다.
|
Listen(void)
|
ICMP 메시지를 수신할 엔드포인트를 준비합니다.
|
SendMsg(const IPPacketInfo *pktInfo, Weave::System::PacketBuffer *msg, uint16_t sendFlags)
|
지정된 대상에 ICMP 메시지를 보냅니다.
|
SendTo(IPAddress addr, Weave::System::PacketBuffer *msg, uint16_t sendFlags)
|
SendTo(addr, INET_NULL_INTERFACEID, msg, sendFlags) 의 동의어입니다. |
SendTo(IPAddress addr, InterfaceId intfId, Weave::System::PacketBuffer *msg, uint16_t sendFlags)
|
지정된 목적지 주소로 ICMP 메시지를 보냅니다.
|
SetICMPFilter(uint8_t numICMPTypes, const uint8_t *aICMPTypes)
|
네트워크 스택에 ICMP6 필터 매개변수를 설정합니다.
|
공개 속성
IPProto
IPProtocol IPProto
인터넷 제어 메시지 프로토콜 (ICMP) 버전
이 필드는 변경 가능한 클래스 변수이지만 수정되지 않는 클래스의 불변 변수입니다.
IPVer
IPVersion IPVer
인터넷 프로토콜 버전
이 필드는 변경 가능한 클래스 변수이지만 수정되지 않는 클래스의 불변 변수입니다.
공개 함수
결합
INET_ERROR Bind( IPAddressType addrType, IPAddress addr, InterfaceId intfId )
엔드포인트를 인터페이스 IP 주소에 바인딩합니다.
엔드포인트를 지정된 네트워크 인터페이스 IP 주소에 바인딩합니다.
세부정보 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
매개변수 |
|
||||||||||||||
반환 값 |
|
LwIP에서는 이미 획득한 LwIP 스택 잠금을 사용하여 이 메서드를 호출하면 안 됩니다.
BindIPv6LinkLocal
INET_ERROR BindIPv6LinkLocal( InterfaceId intf, IPAddress addr )
원시 엔드포인트를 지정된 인터페이스 색인의 IPv6 링크-로컬 범위 주소에 바인딩합니다.
또한 온-대상 대상으로 패킷을 전송하는 데 적합한 다양한 IPv6 소켓 옵션을 설정합니다.
엔드포인트를 intf
으로 표시된 네트워크 인터페이스의 IPv6 링크-로컬 주소 addr
에 결합합니다.
세부정보 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
매개변수 |
|
||||||||||||
매개변수 |
|
||||||||||||
반환 값 |
|
||||||||||||
반환 |
성공 시 INET_NO_ERROR 또는 실패 시 매핑된 OS 오류 잘못된 매개변수 목록으로 인해 INET_ERROR_WRONG_ADDRESS_TYPE이(가) 발생할 수 있습니다. 원시 엔드포인트가 이미 바인딩되었거나 수신 대기 중인 경우 INET_ERROR_INCORRECT_STATE를 반환합니다. 엔드포인트를 인터페이스 IPv6 링크-로컬 주소에 바인딩합니다.
|
LwIP에서는 이미 획득한 LwIP 스택 잠금을 사용하여 이 메서드를 호출하면 안 됩니다.
BindInterface
INET_ERROR BindInterface( IPAddressType addrType, InterfaceId intf )
엔드포인트를 네트워크 인터페이스에 결합합니다.
엔드포인트를 지정된 네트워크 인터페이스 IP 주소에 바인딩합니다.
세부정보 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
매개변수 |
|
||||||||||
반환 값 |
|
LwIP에서는 이미 획득한 LwIP 스택 잠금을 사용하여 이 메서드를 호출하면 안 됩니다.
닫기
void Close( void )
엔드포인트를 닫습니다.
mState != kState_Closed
인 경우 엔드포인트를 닫아 통신 이벤트에 사용할 수 있는 엔드포인트 집합에서 삭제합니다.
LwIP 시스템에서는 이 메서드를 이미 획득한 LwIP 스택 잠금으로 호출하면 안 됩니다.
무료
void Free( void )
엔드포인트를 닫고 메모리를 재활용합니다.
Close
메서드를 호출한 다음 InetLayerBasis::Release
메서드를 호출하여 객체를 메모리 풀로 반환합니다.
LwIP 시스템에서는 이 메서드를 이미 획득한 LwIP 스택 잠금으로 호출하면 안 됩니다.
GetBoundInterface
InterfaceId GetBoundInterface( void )
이 엔드포인트에서 바인딩된 인터페이스를 가져옵니다.
세부정보 | |
---|---|
반환 |
InterfaceId입니다. 바인드된 인터페이스 ID입니다.
|
듣기
INET_ERROR Listen( void )
ICMP 메시지를 수신할 엔드포인트를 준비합니다.
mState
가 이미 kState_Listening
이면 아무 작업도 실행되지 않으면 mState
가 kState_Listening
로 설정되고 엔드포인트는 플랫폼의 시맨틱에 따라 ICMPv6 메시지를 수신할 준비가 된 것입니다.
세부정보 | |||
---|---|---|---|
반환 값 |
|
LwIP에서는 이미 획득한 LwIP 스택 잠금으로 이 메서드를 호출하면 안 됩니다.
메시지 전송
INET_ERROR SendMsg( const IPPacketInfo *pktInfo, Weave::System::PacketBuffer *msg, uint16_t sendFlags )
지정된 대상에 ICMP 메시지를 보냅니다.
Send the ICMP message \c msg using the destination information given in \c addr. Where (sendFlags & kSendFlag_RetainBuffer) != 0, calls Weave::System::PacketBuffer::Free on behalf of the caller, otherwise this method deep-copies \c msg into a fresh object, and queues that for transmission, leaving the original \c msg available after return.
세부정보 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
매개변수 |
|
||||||||||||
반환 값 |
|
SendTo
INET_ERROR SendTo( IPAddress addr, Weave::System::PacketBuffer *msg, uint16_t sendFlags )
SendTo(addr, INET_NULL_INTERFACEID, msg, sendFlags)
의 동의어입니다.
SendTo
INET_ERROR SendTo( IPAddress addr, InterfaceId intfId, Weave::System::PacketBuffer *msg, uint16_t sendFlags )
지정된 목적지 주소로 ICMP 메시지를 보냅니다.
Send the ICMP message in \c msg to the destination given in \c addr. Where (sendFlags & kSendFlag_RetainBuffer) != 0, calls Weave::System::PacketBuffer::Free on behalf of the caller, otherwise this method deep-copies \c msg into a fresh object, and queues that for transmission, leaving the original \c msg available after return.
세부정보 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
매개변수 |
|
||||||||||||
반환 값 |
|
SetICMPFilter
INET_ERROR SetICMPFilter( uint8_t numICMPTypes, const uint8_t *aICMPTypes )
네트워크 스택에 ICMP6 필터 매개변수를 설정합니다.
aICMPTypes
의 코드에 대한 ICMPv6 필터링 매개변수를 시스템 네트워킹 스택의 기본 엔드포인트에 적용합니다.
세부정보 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
매개변수 |
|
||||||||||
반환 값 |
|