Skip to content

Instantly share code, notes, and snippets.

View quackduck's full-sized avatar
running...

Ishan Goel quackduck

running...
View GitHub Profile
#include <pcap.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@quackduck
quackduck / sniff2.c
Last active December 24, 2023 11:28
wifi packet sniffer
#include <pcap.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.my_types.all;
entity bf2_master_stream_v1_0_M00_AXIS is
generic (
-- Users to add parameters here
-- User parameters ends
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.my_types.all;
entity bf2_master_stream_v1_0_M00_AXIS is
generic (
-- Users to add parameters here
-- User parameters ends
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.my_types.all;
entity bf2_master_stream_v1_0_M00_AXIS is
generic (
-- Users to add parameters here
-- User parameters ends
@quackduck
quackduck / stuff.cpp
Created February 12, 2026 23:15
hi robert
#define COMMAND_BUFFER_SIZE (200)
struct CMDPacket {
char command[COMMAND_BUFFER_SIZE];
};
#include <cstring> // memcpy
// easy to change which struct is being encoded/decoded
#define CODE_T CMDPacket