Home | History | Annotate | Download | only in rp-pppoe

Lines Matching refs:fp

28 * fp -- file to dump to
34 * Dumps buffer to fp in an easy-to-read format
37 dumpHex(FILE *fp, unsigned char const *buf, int len)
42 if (!fp) return;
46 fprintf(fp, "(PAP Authentication Frame -- Contents not dumped)\n");
53 fprintf(fp, "%02x ", (unsigned) buf[i]);
55 fprintf(fp, " ");
58 fprintf(fp, " ");
62 fprintf(fp, "%c", buf[i]);
64 fprintf(fp, ".");
70 fprintf(fp, "\n");
77 * fp -- file to dump to
83 * Dumps the PPPoE packet to fp in an easy-to-read format
86 dumpPacket(FILE *fp, PPPoEPacket *packet, char const *dir)
98 if (!fp) return;
104 fprintf(fp, "%s.%03d %s PPPoE ", timebuf, millisec, dir);
106 fprintf(fp, "Discovery (%x) ", (unsigned) type);
108 fprintf(fp, "Session (%x) ", (unsigned) type);
110 fprintf(fp, "Unknown (%x) ", (unsigned) type);
114 case CODE_PADI: fprintf(fp, "PADI "); break;
115 case CODE_PADO: fprintf(fp, "PADO "); break;
116 case CODE_PADR: fprintf(fp, "PADR "); break;
117 case CODE_PADS: fprintf(fp, "PADS "); break;
118 case CODE_PADT: fprintf(fp, "PADT "); break;
119 case CODE_SESS: fprintf(fp, "SESS "); break;
122 fprintf(fp, "sess-id %d length %d\n",
127 fprintf(fp,
142 dumpHex(fp, packet->payload, ntohs(packet->length));