]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/pppoe/pppoe.h
pppd.8: Document netmask option
[ppp.git] / pppd / plugins / pppoe / pppoe.h
index b70cccf7b7080863281829fbce4b8a8bfc0813b2..9360eddf8149a83b309d3f0867a75b41f9943040 100644 (file)
 *
 ***********************************************************************/
 
-#include "config.h"
-
 #include <stdio.h>             /* For FILE */
 #include <sys/types.h>         /* For pid_t */
 #include <ctype.h>
 #include <string.h>
 
-#include "pppd/pppd.h"         /* For error */
+#include <pppd/pppd.h>         /* For error */
 
 /* How do we access raw Ethernet devices? */
 #undef USE_LINUX_PACKET
@@ -260,8 +258,6 @@ UINT16_t etherType(PPPoEPacket *packet);
 int openInterface(char const *ifname, UINT16_t type, unsigned char *hwaddr);
 int sendPacket(PPPoEConnection *conn, int sock, PPPoEPacket *pkt, int size);
 int receivePacket(int sock, PPPoEPacket *pkt, int *size);
-void dumpPacket(FILE *fp, PPPoEPacket *packet, char const *dir);
-void dumpHex(FILE *fp, unsigned char const *buf, int len);
 int parsePacket(PPPoEPacket *packet, ParseFunc *func, void *extra);
 void parseLogErrs(UINT16_t typ, UINT16_t len, unsigned char *data, void *xtra);
 void syncReadFromPPP(PPPoEConnection *conn, PPPoEPacket *packet);
@@ -326,3 +322,10 @@ do {\
 #define NOT_UNICAST(e) ((e[0] & 0x01) != 0)
 #define BROADCAST(e) ((e[0] & e[1] & e[2] & e[3] & e[4] & e[5]) == 0xFF)
 #define NOT_BROADCAST(e) ((e[0] & e[1] & e[2] & e[3] & e[4] & e[5]) != 0xFF)
+
+#ifndef MIN
+#define MIN(a, b)      ((a) < (b)? (a): (b))
+#endif
+#ifndef MAX
+#define MAX(a, b)      ((a) > (b)? (a): (b))
+#endif