资源简介
新版本的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
相关资源
- intel处理器指令集及基本结构
-
Differential ex
pression patterns of Toll-li - Design of Analog CMOS Integrated Circuits 拉扎
- Cyclone 10LP Remote Update Intel FPGA IP 官方工
- Intel 82579LM 82579V千兆以太网控制器驱动
- VMware vSphere 的 Intel 82579LM网卡驱动 最
- intel 82579LM 网卡驱动Linux系统版 v1.9.
- 中网公司联合Intel推出中小企业网络解
- In vitro screening of lactobacilli with antago
- System Design Interview - An Insider’s Guide
- LOM网卡驱动:Intel(R) Ethernet Connecti
- Grokking the System Design Interview
- Intel(R) 82579V网卡驱动for server20033
- 300系列WIN7 USB驱动.7z
- Indentification of Interface Blocker to the LA
- BullZip PDF Printer v10.10.0.2307 官方版
- Can EC-MPS reduce gastrointestinal side effect
- Bioleaching of chalcopyrite and marmatite by m
- Intel® Parallel Studio XE 2016 Update 1 专业
- Intel Parallel Studio XE Cluster Edition for W
- IntelPRO/无线2011局域网方案
-
A web-ba
sed interview platform with geospat - 含Microsoft.Office.Interop.Owc11
- New Analytical Solution of a Generalized Negat
- Analytical Studies of the (2+1)-Dimensiona
- Intel 845GL/G/GE/GV/865G/915G显卡驱动 v14.
- Existence of Solutions to Volterra Integral Eq
- Existence of S-asymptotically ω-periodic
- The quasi-sure existence of solutions for inte
- STM32F103VCT6TR - High-density performance lin
评论
共有 条评论