Lines Matching refs:fp
37 dumpHex(FILE *fp, unsigned char const *buf, int len) in dumpHex() argument
42 if (!fp) return; in dumpHex()
46 fprintf(fp, "(PAP Authentication Frame -- Contents not dumped)\n"); in dumpHex()
53 fprintf(fp, "%02x ", (unsigned) buf[i]); in dumpHex()
55 fprintf(fp, " "); in dumpHex()
58 fprintf(fp, " "); in dumpHex()
62 fprintf(fp, "%c", buf[i]); in dumpHex()
64 fprintf(fp, "."); in dumpHex()
70 fprintf(fp, "\n"); in dumpHex()
86 dumpPacket(FILE *fp, PPPoEPacket *packet, char const *dir) in dumpPacket() argument
98 if (!fp) return; in dumpPacket()
104 fprintf(fp, "%s.%03d %s PPPoE ", timebuf, millisec, dir); in dumpPacket()
106 fprintf(fp, "Discovery (%x) ", (unsigned) type); in dumpPacket()
108 fprintf(fp, "Session (%x) ", (unsigned) type); in dumpPacket()
110 fprintf(fp, "Unknown (%x) ", (unsigned) type); in dumpPacket()
114 case CODE_PADI: fprintf(fp, "PADI "); break; in dumpPacket()
115 case CODE_PADO: fprintf(fp, "PADO "); break; in dumpPacket()
116 case CODE_PADR: fprintf(fp, "PADR "); break; in dumpPacket()
117 case CODE_PADS: fprintf(fp, "PADS "); break; in dumpPacket()
118 case CODE_PADT: fprintf(fp, "PADT "); break; in dumpPacket()
119 case CODE_PADM: fprintf(fp, "PADM "); break; in dumpPacket()
120 case CODE_PADN: fprintf(fp, "PADN "); break; in dumpPacket()
121 case CODE_SESS: fprintf(fp, "SESS "); break; in dumpPacket()
124 fprintf(fp, "sess-id %d length %d\n", in dumpPacket()
129 fprintf(fp, in dumpPacket()
144 dumpHex(fp, packet->payload, ntohs(packet->length)); in dumpPacket()