Time of Update: 2018-12-03
Linux PPP 資料收發流程 轉載時請註明出處和作者連絡方式:http://blog.csdn.net/absurd作者連絡方式:李先靜<xianjimli at hotmail dot com>更新時間:2007-5-4 PPP(Point-to-Point)提供了一種標準的方法在點對點的串連上傳輸多種協議資料包,它最常見的用途可能是傳統的撥接了(據說現在的寬頻接入也有採用PPPOE方式的)。在Linux Mobile
Time of Update: 2018-12-03
1:訊息接收端#include<stdlib.h>#include<stdio.h>#include<unistd.h>#include<string.h>#include <sys/wait.h>#include<sys/types.h>#include<sys/ipc.h>#include<sys/msg.h>#include <errno.h>#include
Time of Update: 2018-12-03
1:代碼#include <stdio.h>#include <sys/types.h>#include <sys/sem.h>#include <errno.h>#include <stdlib.h>#include <signal.h>#define MAX_SEMAPHORES 3union semun{ int val; /* value for SETVAL */
Time of Update: 2018-12-03
1:udp通訊框圖在上面的用戶端,也是可以執行bind()和connect操作的,在下面的用戶端代碼中,我們是這麼來實現的。2:udp server端代碼#if 1#include "./../../udp_client/src/iolib/iolib.h" /* 添加使用者自已的I/O函數庫 */#define MAX_LINE 100//extern int checkSelect(int handfd,char *rwflag);void my_fun(char * p){if(p ==
Time of Update: 2018-12-03
bill.h bill.c main.c靜態庫//得到 .o檔案gcc -c bill.c//得到 .a檔案ar crv libbill.a bill.o//將 .a檔案連結到可執行檔裡gcc -o main main.c -L. -lbill共用庫//得到 .o檔案gcc -c bill.c//得到 .so檔案gcc -shared -fPCI -o libbill.so bill.o//編譯得到目標檔案gcc -o main main.c -L. -lbill得到libbill.so之後,
Time of Update: 2018-12-03
開發環境宿主機:Linux fedora 2.6.27.5-117.fc10.i686交叉編譯環境:arm-linux-gcc-3.4.5 glibc-2.3.6軟體工具:H-JTAG V1.0 , SEGGER J-Link Commander V4.10i , CodeWarrior for ARM Developer Suite V1.2 , busybox-1.19.2.tar.bz2核心版本:linux-2.6.28.7開發板硬體:(處理器:arm920t(Nor
Time of Update: 2018-12-03
1:共用記憶體代碼#include <sys/shm.h>#include <sys/types.h> /* Type definitions used by many programs */#include <stdio.h> /* Standard I/O functions */#include <stdlib.h> /* Prototypes of commonly used library functions,
Time of Update: 2018-12-03
1:代碼#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include
Time of Update: 2018-12-03
主要是對VLAN的資料包格式進行了抓包分析。同時對vconfig命令的適用進行了說明。PC:10.10.107.168 AP:10.10.107.231(eth0.100)1:添加VLAN,使用vconfig。~# vconfigBusyBoxv1.10.3 (2012-09-23 02:13:20 CST) multi-call binaryUsage:vconfig COMMAND [OPTIONS]...Create andremove virtual ethernet
Time of Update: 2018-12-03
1:範例程式碼#include<stdio.h>#include<fcntl.h>#include<unistd.h>#include<stdlib.h>#include<string.h>#include<signal.h>#include<stdlib.h>#include <sys/wait.h>//the copy fie size must>Mint
Time of Update: 2018-12-03
1:線程與進程的區別2:線程同步:互斥鎖3:線程同步:條件變數4:線程同步:post訊號量在代碼中有執行個體。5:線程退出6:線程範例程式碼/* ============================================================================ Name : threadDemo.c Author : Version : Copyright : Your copyright notice
Time of Update: 2018-12-03
最近工作中涉及到在一定的時間之後對特定的動作進行處理。比如按鍵,按鍵需要在按下至少4S之後,重新啟動系統之類、此時使用定時器,可以確保準確的計時。下面的實現可以通用。struct timer_list os_timer_t; //定義定時器#define OS_TIMER_FUNC(_fn)\void _fn(unsigned long timer_arg)#define OS_GET_TIMER_ARG(_arg, _type)\(_arg) =
Time of Update: 2018-12-03
【軟體的開發環境和資源】宿主機 :fedora 10目標板 :BCM7466交叉編譯工具:mipsel-linux-gcc , mipsel-linux-ar , mipsel-linux-ranlib ,
Time of Update: 2018-12-03
vmlinux是核心檔案, zImage是一般情況下預設的壓縮核心映像檔案,壓縮vmlinux,加上一段解壓啟動代碼得到,只能從0X0地址運行。 uImage是u-boot使用bootm命令引導的Linux壓縮核心映像檔案格式, 使用工具mkimage對普通的壓縮核心映像檔案(zImage)加工而得。可以由bootm命令從任意地址解壓啟動核心。 由於bootloader一般要佔用0X0地址,所以,uImage相比zImage的好處就是可以和bootloader共存。
Time of Update: 2018-12-03
uboot在進行系統啟動和核心載入的時候被分為倆個階段,第一階段主要是寫彙編代碼,我沒有仔細研究,只是看了看移植好的針對mini2440的tekkman的uboot代碼。第二個階段為由C寫成,易於研究和學習。掌握了基本的流程。(1)第一階段的功能Ø 硬體裝置初始化Ø 載入U-Boot第二階段代碼到RAM空間Ø 設定好棧Ø 跳轉到第二階段代碼入口(2)第二階段的功能Ø 初始化本階段使用的硬體裝置Ø 檢測系統記憶體映射Ø 將核心從Flash讀取到RAM中Ø 為核心設定啟動參數Ø
Time of Update: 2018-12-03
[前記]Linux自從2.6.20之後,工作隊列發生了一些變化,目前從網路上搜尋的資料一般都是介紹老版本的工作隊列,很少見到對新版本的介紹。本文對新老版本都做了簡要概述,並分別提供了簡單的實作案例。工作隊列(work queue)是Linux
Time of Update: 2018-12-03
環境:linux核心載入自己的製作的檔案系統。錯誤資訊有以下幾種:錯誤資訊1:Root-NFS: Server returned error -5 while mounting /mini2440/rootfsVFS: Unable to mount root fs via NFS, trying floppy.VFS: Cannot open root device "nfs" or unknown-block(2,0)Please append a correct "root=" boot
Time of Update: 2018-12-03
作業系統 fedora 10mail 是系統內建的一個郵件用戶端程式。 首先需要瞭解 mail 命令的常用參數Usage: mail -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS-S OPTION users-v Verbose mode. The details of delivery are
Time of Update: 2018-12-03
通過將近一個月的研究, 終於在arm板子上完成Linux下多媒體訊息的的編解碼多媒體訊息的接收 1. 先將arm+linux 通過ppp(cmwap方式)撥號, 得到一個移動內網ip地址2. 通過at指令AT+CMGR 讀取收到的多媒體訊息提醒的簡訊。 其pdu碼大概是這樣一竄資料:0891683108100005F0640C91015618451010000411307101509423 8B0605040B8423F0D006246170706C69636174696F6E2F7
Time of Update: 2018-12-03
Linux檔案系統(一)——群居和一儒家和諧的思想不僅主導著我們的日常生活和社會關係,而且在Unix/Linux檔案系統的設計中充分體現。先秦儒家以西周末年太史史伯提出的“和實生物,同則不繼。”《國語·鄭語》中,則對和諧思想做了進一步的完善和發展,把“和”作為處理人的身心關係、人際關係、群己關係、人與自然關係的根本法則,所謂“和也者,天下之達道也”。 “和”既是人倫關係的價值取向,又是萬事萬物產生發展的機制。儒家所說的和諧,並不是毫無差異的苟同,而是包含差異或對立的多種不同因素協調、互補、融合、