Changeset 124
- Timestamp:
- 03/17/07 19:15:13 (22 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
l2ping80211.c (modified) (1 diff)
-
lorcon_forge.c (modified) (3 diffs)
-
lorcon_forge.h (modified) (2 diffs)
-
lorcon_packasm.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/l2ping80211.c
r115 r124 28 28 29 29 #include <tx80211.h> 30 #include <tx80211_packet.h>31 30 #include <lorcon_packasm.h> 32 31 #include <lorcon_forge.h> -
trunk/lorcon_forge.c
r114 r124 67 67 68 68 void lcpf_randmac(uint8_t *addr, int valid) { 69 static int listlen = 0;69 static int listlen = 0; 70 70 71 71 if (listlen == 0) { … … 83 83 } 84 84 85 addr[3] = rand() % 255;86 addr[4] = rand() % 255;87 addr[5] = rand() % 255;85 addr[3] = rand() % 255; 86 addr[4] = rand() % 255; 87 addr[5] = rand() % 255; 88 88 } 89 89 … … 188 188 } 189 189 190 void lcpf_proberesp(struct lcpa_metapack *pack, uint8_t *dst, uint8_t *src, 191 uint8_t *bssid, int framecontrol, int duration, int fragment, 192 int sequence, uint64_t timestamp, int beaconint, 193 int capabilities) 194 { 195 uint8_t chunk[8]; 196 uint16_t *sixptr = (uint16_t *) chunk; 197 uint64_t *ch64 = (uint64_t *) chunk; 198 199 lcpf_80211headers(pack, 0, 5, framecontrol, duration, 200 dst, src, bssid, NULL, 201 fragment, sequence); 202 203 *ch64 = timestamp; 204 pack = lcpa_append_copy(pack, "BEACONBSSTIME", 8, chunk); 205 206 *sixptr = beaconint; 207 pack = lcpa_append_copy(pack, "BEACONINT", 2, chunk); 208 209 *sixptr = capabilities; 210 pack = lcpa_append_copy(pack, "BEACONCAP", 2, chunk); 211 212 } -
trunk/lorcon_forge.h
r109 r124 33 33 * All lorcon packet forge functions use the lcpf_ namespace 34 34 */ 35 36 37 #ifndef __PACKET_ASSEMBLY_H__ 38 #include <lorcon_packasm.h> 39 #endif 35 40 36 41 /* Create a random MAC address, optionally seeded with a valid wireless OUI … … 90 95 uint8_t *bssid, int framecontrol, int duration, int fragment, 91 96 int sequence); 92 97 /* Generate a proberesp frame */ 98 void lcpf_proberesp(struct lcpa_metapack *pack, uint8_t *dst, uint8_t *src, 99 uint8_t *bssid, int framecontrol, int duration, int fragment, 100 int sequence, uint64_t timestamp, int beaconint, 101 int capabilities); 93 102 #endif -
trunk/lorcon_packasm.h
r109 r124 65 65 int freedata; 66 66 }; 67 typedef struct lcpa_metapack lcpa_metapack_t; 67 68 68 69 /* Initialize a packet list */
