isis_receive:패키지 수거 프로세스
int
isis_receive (struct thread *thread)
{
struct isis_circuit *circuit;
u_char ssnpa[ETH_ALEN];
int retval;
/*
* Get the circuit
*/
circuit = THREAD_ARG (thread);
assert (circuit);
if (!circuit->area)
return ISIS_OK;
if (circuit->rcv_stream == NULL)
circuit->rcv_stream = stream_new (ISO_MTU (circuit));
else
stream_reset (circuit->rcv_stream);
retval = circuit->rx (circuit, ssnpa);
circuit->t_read = NULL;
if (retval == ISIS_OK)
retval = isis_handle_pdu (circuit, ssnpa);
/*
* prepare for next packet.
*/
THREAD_READ_ON (master, circuit->t_read, isis_receive, circuit,
circuit->fd);
return retval;
}
주요 프로세스:
1 패키지 rx, 등록된 처리 함수 호출, 예를 들어 isis*receive_*_bcast/p2p
2 메시지 처리handle
3 다음 READ 처리ON
메시지를 처리하는 논리는 다음과 같다.
static int
isis_handle_pdu (struct isis_circuit *circuit, u_char * ssnpa)
{
switch (hdr->pdu_type)
{
case L1_LAN_HELLO:
retval = process_lan_hello (ISIS_LEVEL1, circuit, ssnpa);
break;
case L2_LAN_HELLO:
retval = process_lan_hello (ISIS_LEVEL2, circuit, ssnpa);
break;
case P2P_HELLO:
retval = process_p2p_hello (circuit);
break;
}
호출 관계
(gdb) bt
#0 isis_handle_pdu (circuit=0x7ffff427c8c8, ssnpa=0x7ffff4582b60 "") at isis_pdu.c:1654
#1 0x00007ffff42ce5a2 in isis_receive (thread=0x7ffff4582cc0) at isis_pdu.c:1796
#2 0x00007ffff42f24ef in thread_call (thread=0x7ffff4582cc0) at thread.c:1177
#3 0x00007ffff42bda3d in main (argc=5, argv=0x662700, envp=0x6460b0) at isis_main.c:353
#4 0x00007ffff7a0708f in ns3::DceManager::DoStartProcess (context=0x677f40) at ../model/dce-manager.cc:283
#5 0x00007ffff7a907fc in ns3::TaskManager::Trampoline (context=0x662900) at ../model/task-manager.cc:274
#6 0x00007ffff7a8c7d7 in ns3::PthreadFiberManager::Run (arg=0x678230) at ../model/pthread-fiber-manager.cc:402
#7 0x000000318b2079d1 in start_thread () from /lib64/libpthread.so.0
#8 0x000000318a6e88fd in clone () from /lib64/libc.so.6
(gdb)
주요 결론:
PPP 네트워크의 경우 SNPA 값을 따지지 않습니다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.