This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Hello, and welcome to this brief, but hopefully complete, example file for | |
* wireless packet injection using pcap. | |
* | |
* Although there are various resources for this spread on the web, it is hard | |
* to find a single, cohesive piece that shows how everything fits together. | |
* This file aims to give such an example, constructing a fully valid UDP packet | |
* all the way from the 802.11 PHY header (through radiotap) to the data part of | |
* the packet and then injecting it on a wireless interface | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
Servo myservo; // create servo object to control a servo | |
void setup() | |
{ | |
Serial.begin(9600); | |
myservo.attach(9); // attaches the servo on pin 9 to the servo object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define UID_PACKING_LEN 8 | |
int header_insert_special_int(char* where, size_t size, int32_t val) | |
{ | |
int err = 0; | |
if (val < 0 || size < sizeof(val)) | |
{ | |
err++; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int header_set_uid_itsbig(char* where, size_t size, int32_t val) | |
{ | |
int err = 0; | |
if (val < 0 || size < sizeof(val)) | |
{ | |
err++; | |
} | |
else | |
{ | |
memset(where, 0, size); |