openwrt linux
linbounconstraint
这个作者很懒,什么都没留下…
展开
-
把TortoiseSVN中默认的文件比较工具替换为Beyond Compare
1.打开TortoiseSVN的配置:2.Settings->Diff Viewer 把默认的 TortoiseMerge换成External,然后再设置为BeyondCompare。3.TortoiseSVNDiffSelect Settings from Explorer’s TortoiseSVN submenu.Switch to the Diff ...原创 2018-05-09 09:54:06 · 1145 阅读 · 1 评论 -
[openwrt] firewall
root@OpenWrt:/etc/config# ls4g dataUsageCfg network8192eeshare dhcp qos8192eewpa dropbear remoteupgradeAPNProf...原创 2018-05-16 11:30:38 · 375 阅读 · 0 评论 -
dmesg 总结 iwpriv ra0 show stacountinfo
dmesg 可将mtk平台的iwpriv的一些命令的输出没有在用户态。使用的是printk打印。若想获取到打印信息,常用的两种方法。 1.使用ioctl,copy到user态 2.使用dmesg。 a.类似 dmesg -c 先把dmesg的buf清空。 b.然后执行iwpriv ra0 show stacountinfo 打印信息会保存到dmesg的buf里面(这个时候可以dm...原创 2018-05-22 17:19:09 · 1412 阅读 · 1 评论 -
itoa()
itoa() 不跨平台。linux 下:char str[255];sprintf(str, "%x", 100); //将100转为16进制表示的字符串。转自:https://www.cnblogs.com/bluestorm/p/3168719.html C语言itoa()函数和atoi()函数详解(整数转字符C实现) C语言提供了几个标准库函数,可以将任意类型(整型、长整型...原创 2018-06-29 10:43:29 · 880 阅读 · 0 评论 -
WIFI 信道 channel
▲5GHz 信道划分,国内室内AP可用36, 40, 44, 48, 52, 56, 60, 64, 149,153, 157, 161, 165等13个信道 ▲2.4GHz 共有14个信道,国内可用1-13信道,不干扰的仅1、6、11...原创 2018-06-29 15:00:06 · 11748 阅读 · 1 评论 -
mtk_openwrt 编译uboot
进入Uboot目录配置BootLoader配置(make menuconfig)选择 单image。 ( [ ] Dual Image) makeMediatek BootLoader 5.0.0.0 Configuration ---------------------------------------------------------------------------...原创 2018-07-02 10:39:00 · 4610 阅读 · 2 评论 -
C语言去除字符串首尾空格,trim()函数实现
C语言去除字符串首尾空格,trim()函数实现 https://blog.csdn.net/u013022032/article/details/50521465/*C语言去除字符串首尾空格,trim()函数实现https://blog.csdn.net/u013022032/article/details/50521465*/#include <stdio.h>...原创 2018-07-02 15:23:29 · 18981 阅读 · 1 评论 -
[javascript] 如何 一次删除多个数组元素
一次性删除数组中的多个元素,使用逆向循环,否则会破坏掉元素下标,得不到正确的结果https://www.cnblogs.com/ouchen0312/p/7798096.html var data = {"LTEParaGetRsp":{"RspStatus":"Success","MsgCode":"0","GetApConfList":[原创 2018-07-02 18:16:09 · 3320 阅读 · 0 评论 -
openwrt WIFI 不同国家channel list设置
各个地区2.4G及5G信道一览表 美洲(FCC)2.412 ~ 2.462 GHz:11个信道5.15 ~ 5.35 GHz,5.725 ~ 5.825 GHz;12个信道中国2.412 ~ 2.472 GHz:13个信道5.725 ~ 5.825 GHz:4个信道ETSI2.412 ~ 2.472 GHz:13个信道5.15 ~ 5.35 GHz:8个信道547...原创 2018-07-03 15:29:39 · 14885 阅读 · 0 评论 -
openwrt 编译openssl,加密备份文件
编译openssl 1.make menuconfig lbo@donglebuild2:~/work/furrion/code/openwrt7621/trunk/base$ make menuconfig 2. .config - OpenWrt Configuration ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ...原创 2018-06-28 11:11:42 · 2222 阅读 · 0 评论 -
[openwrt] UCI @WifiInfo[0]
https://www.cnblogs.com/tfanalysis/p/3688080.htmlhttps://wiki.openwrt.org/doc/uci#configuration.files原创 2018-07-04 14:17:11 · 525 阅读 · 0 评论 -
grep -A -B -C
-A -B -C 后面都跟阿拉伯数字 -A是显示匹配后和它后面的n行。 -B是显示匹配行和它前面的n行。 -C是匹配行和它前后各n行。 总体来说,-C覆盖面最大。用它保险些。哈哈。这3个开关都是关于匹配行的上下文的(context)。于是 grep -A 4 wikipedia 密码文件.txt 就是搜索密码文件,找到匹配“wikipedia”字串的行,显示该行后后面紧跟的4...原创 2018-05-08 15:46:00 · 81667 阅读 · 4 评论 -
openwrt如何编译
Compile1.download && install feedscd trunk/base;./scripts/feeds update -a ./scripts/feeds install -a 2.download default config:cd trunk/basecat ../cusconfig/diffconfig > .configma...原创 2018-05-08 15:29:00 · 286 阅读 · 0 评论 -
C 语言 查看文件,文件夹是否存在 access,opendir
int is_dir_exist(const char *dir_path){ if(dir_path == NULL) { return -1; } if(opendir(dir_path) == NULL) { return -1; } return 0;}在头文件unistd.h中的预定义...原创 2018-05-09 11:16:34 · 699 阅读 · 0 评论 -
fread fgets feof 读文件到buf里面
从dhcp.leases读文件,每次读一行,fgets,写到dst_dhcp_list指向的buf里面。feof(fp)有两个返回值:如果遇到文件结束,函数feof(fp)的值为非零值,否则为0。int conf_get_dhcp_list1_new(char* dst_dhcp_list){ FILE *f=NULL; if ((f = fopen("/tmp/dhc...原创 2018-05-09 14:54:18 · 470 阅读 · 0 评论 -
shell
l3filter_num=`iptables -L -t filter --line | grep -A 10 "FORWARD" | grep "L3FILTER" | cut -c 1-3 ` echo "$SH_NAME l3filter_num:$l3filter_num" > /dev/kmsg if [ "$l3filter_num" != ...原创 2018-05-18 16:35:00 · 82 阅读 · 0 评论 -
openwrt 显示客户端client 连接的信息 /proc/net/arp /tmp/dhcp.leases
显示当前路由器上,client的name,ip,mac,connect_type信息有两种方式:来自链接 一。通过DHCP client分配列表 (缺点:client列表会根据超时时间刷新,一般超时时间为12h,) 二。通过arp缓存列表/proc/net/arp(缺点:arp刷新时间默认为30s,这个时间的误差可以接受。)主要讲解第二种方法: Flags: 0x0是找不到这台主...原创 2018-05-07 16:03:51 · 8184 阅读 · 0 评论 -
Linux C语言调用system命令并获取命令的返回值
思路:popen打开,命令执行完后,对fp进行读取,读到output参数里面。 注意:size不要太大。一般64,128够用。用1024或者4028,会出现段错误,栈报错。 popen()可以执行shell命令,并读取此命令的返回值; popen()函数通过创建一个管道,调用fork()产生一个子进程,执行一个shell以运行命令来开启一个进程。可以通过这个管道执行标准输入输出操作。这个...原创 2018-05-07 16:25:58 · 13196 阅读 · 0 评论 -
aaaaaaaaaa
json_object *parse_dhcp_list_2json(char* src_str,int index,json_object *rsp_dhcp_list_json){ char *delim=" "; char mac[64] = {0} ; char *p; char *q; int type; char *one ="1";...原创 2018-05-07 17:13:02 · 221 阅读 · 0 评论 -
C 字符串转大小写strupr , strlowr, tolower, toupper
转大写char *strupr(char *str){ char *orign=str; for (; *str!='\0'; str++) *str = toupper(*str); return orign;}转小写char *strlowr(char *str){ char *orign=str; for (; *str...原创 2018-05-14 15:41:15 · 21980 阅读 · 1 评论 -
cprintf
#define cprintf(fmt, args...) do { \ FILE *fp = fopen("/dev/console", "w"); \ if (fp) { \ fprintf(fp, fmt , ## args); \ fclose(fp); \ } \} while (0)原创 2018-05-08 13:08:30 · 241 阅读 · 0 评论 -
svn
查看本机和服务器,有啥不同。类似于git statussvn st -qlbo@donglebuild2:~/work/code/test/openwrt7621/trunk/base$ svn st -qM package/ramips/appcustom/confapp/src/main.cM package/ramips/ui/luci-mtk/src...原创 2018-05-08 14:43:17 · 140 阅读 · 0 评论 -
linux c 创建线程 每隔2分钟,去check一个文件,若该文件大小大于1024k,删除文件
可以通过 pthread_create()函数创建新线程。#include <pthread.h>int pthread_create(pthread_t *restrict tidp, const pthread_attr_t *restrict attr, ...原创 2018-05-25 15:23:36 · 294 阅读 · 0 评论 -
[openwrt][telnet][ftp] 关闭telnet和ftp,ssh
获取telnet的进程号ps | grep "telnetd" | grep &原创 2018-07-23 15:18:31 · 4139 阅读 · 1 评论