⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 check_listen.awk

📁 softphone client for test
💻 AWK
字号:
#!/usr/bin/gawk -f 

BEGIN {
  pdutype = 0;
}

function process_h225_pdu(title,        type, tunneling)
{
  while (getline > 0) {
    if ($0 ~ /^  }/) 
      break;
    else if ($1 ~ /h323_message_body/) {
      type = $3;
    } else if ($1 ~ /h245Tunneling/)
      tunneling = $3;
  }
  printf ("%s H225: %s, tunnel = %s\n", title, type, tunneling)
}

function process_h245_pdu(title,          type)
{
  getline;
  type = $2;
  while (getline > 0) {
    if ($0 ~ /^  }/) 
      break;
  }
  printf("%s H245: %s\n", title, type);
}

/H225[\t ]*Received PDU/ {
  process_h225_pdu("RX")
  next;
}

/H225[\t ]*Sending PDU/ {
  process_h225_pdu("TX")
  next;
}

/H245[\t ]*Received PDU/ {
  process_h245_pdu("RX")
  next;
}

/H245[\t ]*Sending PDU/ {
  process_h245_pdu("TX")
  next;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -