OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / user / ferret / ieee8021x.c
1 /* Copyright (c) 2007 by Errata Security */\r
2 #include "protos.h"\r
3 #include "formats.h"\r
4 #include "netframe.h"\r
5 #include "ferret.h"\r
6 #include <string.h>\r
7 #include <stdio.h>\r
8 \r
9 \r
10 void process_802_1x_auth(struct Seaper *seap, struct NetFrame *frame, const unsigned char *px, unsigned length)\r
11 {\r
12         unsigned type;\r
13         seap;\r
14         if (length < 3) {\r
15                 FRAMERR(frame, "802.1x: truncated\n");\r
16                 return;\r
17         }\r
18 \r
19         switch (px[0]) {\r
20         case 1: /*version = 1*/\r
21                 type = px[1];\r
22 \r
23                 SAMPLE("IEEE802.11", "auth",REC_UNSIGNED, &type, sizeof(type));\r
24                 switch (type) {\r
25                 case 1: /*start*/\r
26                         break;\r
27                 case 3: /* KEY */\r
28                         break;\r
29                 default:\r
30                         FRAMERR(frame, "802.1x: truncated\n");\r
31                 }\r
32                 break;\r
33         default:\r
34                 FRAMERR(frame, "802.1x: truncated\n");\r
35                 break;\r
36         }\r
37         \r
38         \r
39 }\r
40 \r