Ejemplo n.º 1
0
void
beep_print(netdissect_options *ndo, const u_char *bp, u_int length)
{

	if (l_strnstart("MSG", 4, (const char *)bp, length)) /* A REQuest */
		ND_PRINT((ndo, " BEEP MSG"));
	else if (l_strnstart("RPY ", 4, (const char *)bp, length))
		ND_PRINT((ndo, " BEEP RPY"));
	else if (l_strnstart("ERR ", 4, (const char *)bp, length))
		ND_PRINT((ndo, " BEEP ERR"));
	else if (l_strnstart("ANS ", 4, (const char *)bp, length))
		ND_PRINT((ndo, " BEEP ANS"));
	else if (l_strnstart("NUL ", 4, (const char *)bp, length))
		ND_PRINT((ndo, " BEEP NUL"));
	else if (l_strnstart("SEQ ", 4, (const char *)bp, length))
		ND_PRINT((ndo, " BEEP SEQ"));
	else if (l_strnstart("END", 4, (const char *)bp, length))
		ND_PRINT((ndo, " BEEP END"));
	else
		ND_PRINT((ndo, " BEEP (payload or undecoded)"));
}
Ejemplo n.º 2
0
void
beep_print(const u_char *bp, u_int length)
{

	if (l_strnstart("MSG", 4, (const char *)bp, length)) /* A REQuest */
		printf(" BEEP MSG");
	else if (l_strnstart("RPY ", 4, (const char *)bp, length))
		printf(" BEEP RPY");
	else if (l_strnstart("ERR ", 4, (const char *)bp, length))
		printf(" BEEP ERR");
	else if (l_strnstart("ANS ", 4, (const char *)bp, length))
		printf(" BEEP ANS");
	else if (l_strnstart("NUL ", 4, (const char *)bp, length))
		printf(" BEEP NUL");
	else if (l_strnstart("SEQ ", 4, (const char *)bp, length))
		printf(" BEEP SEQ");
	else if (l_strnstart("END", 4, (const char *)bp, length))
		printf(" BEEP END");
	else
		printf(" BEEP (payload or undecoded)");
}
Ejemplo n.º 3
0
char *
beep_print(const u_char *bp, u_int length)
{

   if (l_strnstart("MSG", 4, (const char *)bp, length)) /* A REQuest */
      sprintf(&ArgusBuf[strlen(ArgusBuf)]," BEEP MSG");
   else if (l_strnstart("RPY ", 4, (const char *)bp, length))
      sprintf(&ArgusBuf[strlen(ArgusBuf)]," BEEP RPY");
   else if (l_strnstart("ERR ", 4, (const char *)bp, length))
      sprintf(&ArgusBuf[strlen(ArgusBuf)]," BEEP ERR");
   else if (l_strnstart("ANS ", 4, (const char *)bp, length))
      sprintf(&ArgusBuf[strlen(ArgusBuf)]," BEEP ANS");
   else if (l_strnstart("NUL ", 4, (const char *)bp, length))
      sprintf(&ArgusBuf[strlen(ArgusBuf)]," BEEP NUL");
   else if (l_strnstart("SEQ ", 4, (const char *)bp, length))
      sprintf(&ArgusBuf[strlen(ArgusBuf)]," BEEP SEQ");
   else if (l_strnstart("END", 4, (const char *)bp, length))
      sprintf(&ArgusBuf[strlen(ArgusBuf)]," BEEP END");
   else
      sprintf(&ArgusBuf[strlen(ArgusBuf)]," BEEP (payload or undecoded)");

   return(ArgusBuf);
}