资源简介
新版本的log_to_file,可以将收到的csi数据以时间戳命名。
代码片段和文件信息
/*
* (c) 2008-2011 Daniel Halperin
*/
#include “iwl_connector.h“
#include
#include
#include
#include
#include
#include
#include
#include
#include nk.h>
#define MAX_PAYLOAD 2048
#define SLOW_MSG_CNT 1
int sock_fd = -1; // the socket
FILE* out = NULL;
void check_usage(int argc char** argv);
FILE* open_file(char* filename char* spec);
void caught_signal(int sig);
void exit_program(int code);
void exit_program_err(int code char* func);
int main(int argc char** argv)
{
/* Local variables */
struct sockaddr_nl proc_addr kern_addr; // addrs for recv send bind
struct cn_msg *cmsg;
char buf[4096];
int ret;
unsigned short l l2;
int count = 0;
/* Make sure usage is correct */
//check_usage(argc argv);
char date_file_name[64];
struct tm *t;
time_t tt;
/* Setup the socket */
sock_fd = socket(PF_NETlink SOCK_DGRAM NETlink_CONNECTOR);
if (sock_fd == -1)
exit_program_err(-1 “socket“);
/* Initialize the address structs */
memset(&proc_addr 0 sizeof(struct sockaddr_nl));
proc_addr.nl_family = AF_NETlink;
proc_addr.nl_pid = getpid(); // this process‘ PID
proc_addr.nl_groups = CN_IDX_IWLAGN;
memset(&kern_addr 0 sizeof(struct sockaddr_nl));
kern_addr.nl_family = AF_NETlink;
kern_addr.nl_pid = 0; // kernel
kern_addr.nl_groups = CN_IDX_IWLAGN;
/* Now bind the socket */
if (bind(sock_fd (struct sockaddr *)&proc_addr sizeof(struct sockaddr_nl)) == -1)
exit_program_err(-1 “bind“);
/* And subscribe to netlink group */
{
int on = proc_addr.nl_groups;
ret = setsockopt(sock_fd 270 NETlink_ADD_MEMBERSHIP &on sizeof(on));
if (ret)
exit_program_err(-1 “setsockopt“);
}
/* Set up the “caught_signal
相关资源
- qt QPainter 绘制跑马灯
- VTune license
- MIPI Alliance Standard for Display Pixel Inter
- 101 Great Answers to the Toughest Interview Qu
- Microsoft.Office.Interop.PowerPoint.rar
- 东北大学数据结构实验1打印机fifo
- ABB PC Interface
- Qt 使用QPainter类在子控件上画图
- 基于Qt绘制的时间轴demo
- IntelHex S-Record 文件编辑转换器 V0.60
- IntelCoreSeries2.1, win7桌面小工具,显示
- intel hex 校验和计算工具
- pyOpenSSL+zope.interface
- 基于IntervalZero RTX 环境下的进程间通讯
- windows intel_sdk_for_opencl
- 英特尔集成显卡及核心显卡Intel(R)
- Intel Parallel Studio XE 2018 Update 1 Windows
- nierInterface.dll
- InternetDownloadManager-IDM_6.2x_Crack_v16.2.e
- 神反转International Edition.ex4
- IntelliJ-IDEA Windows 过度到 Mac 必备快捷
- Unity局域网联机插件 Wifi-Hotspot Local
- Intercultural Communication 讲义 .pdf
- ThinkpadE450黑苹果Clover包EFI包支持Inte
- Printer打印类
-
AxInterop.DSOfr
amer.dll - intellij idea采用ssm框架实现的数据库增
- X64 inline hook CreateProcessInternalW
- Quickstart IBS CMD G4
- Toward a protein–protein interaction map be
评论
共有 条评论