c语言
i-derry
专注于云计算、OpenWrt开发 微信公众号: OpenWrt ,定期推送OpenWrt、WiFi开发相关技术文章。
展开
-
函数指针
#include stdlib.h>#include stdio.h>typedef int (*callback)(int ,int);struct st{ int x; int y; callback operate_xy; /*地址,指向函数,占4字节*/};int test(int x,int y){原创 2014-01-16 22:28:46 · 504 阅读 · 0 评论 -
指针与数组,静态变量与auto变量
#include stdio.h>int m = 0;static n = 0;int main(int argc,char *argv[]){ int a,b,c = 0; char *p0 = "p111111111111"; static char *p1 = "p111111111111"; cha原创 2014-01-16 22:32:33 · 890 阅读 · 0 评论 -
portal认证服务器白名单
在路由器portal认证模块中,认证前用户是不能通过路由器上网的,但可以访问指定的域名,portal认证模块中需要放行认证服务器的ip地址,域名对应的ip可能是多个,以下程序模拟域名解析获取多个ip地址。#include #include #include #include #include int add_white_ip_address(char * d原创 2015-06-15 14:41:43 · 2682 阅读 · 0 评论 -
通过wifi离线推广ios app
搭建https服务器nginx的配置选项NGINX_HOME = $(shell pwd)/nginx-1.6.2NGINX_VERSION=nginx-1.6.2ROORDIR=/mnt/srcall: config_test $(MAKE) -C $(NGINX_VERSION)config_test: echo "dir="$(ROOTDIR) ( i原创 2015-07-30 15:06:09 · 1541 阅读 · 1 评论