vxworks_networking
所属分类:VxWorks
开发工具:C/C++
文件大小:52KB
下载次数:11
上传日期:2009-09-15 21:43:26
上 传 者:
zhouqiqiu1982
说明: vxworks中各种协议通信的源代码例子,包括ftp,raw ip,ether等
(communication of various protocols vxworks source code examples, including ftp, raw ip, ether, etc.)
文件列表:
vxworks_networking\ethernet\etherDemo.h (842, 2002-07-17)
vxworks_networking\ethernet\etherInputDemo.c (3487, 2002-07-17)
vxworks_networking\ethernet\etherOutputDemo.c (3074, 2002-07-17)
vxworks_networking\ethernet\printEtherAddrs.c (2266, 2002-07-17)
vxworks_networking\ftp\ftpData.txt (15, 2002-07-17)
vxworks_networking\ftp\vxFtpClient.c (3020, 2002-07-17)
vxworks_networking\nfs\nfsWrite.c (2567, 2002-07-17)
vxworks_networking\nonblock-raw-socket\nonBlockReadDemo.c (5052, 2002-07-17)
vxworks_networking\ping\vxPing.c (10318, 2002-07-17)
vxworks_networking\rcmd\rdate.c (2456, 2002-07-17)
vxworks_networking\tcp\echoClient.c (9448, 2002-07-17)
vxworks_networking\tcp\echoServer.c (8285, 2002-07-17)
vxworks_networking\tcp\uxBlastee.c (3977, 2002-07-17)
vxworks_networking\tcp\uxBlaster.c (2760, 2002-07-17)
vxworks_networking\tcp\vxBlastee.c (4748, 2002-07-17)
vxworks_networking\tcp\vxBlaster.c (3034, 2002-07-17)
vxworks_networking\tcp\winBlaster.c (4062, 2002-07-17)
vxworks_networking\udp\broadcastGet.c (3986, 2002-07-17)
vxworks_networking\udp\broadcastSend.c (3255, 2002-07-17)
vxworks_networking\udp\client.h (469, 2002-07-17)
vxworks_networking\udp\udpExample.h (547, 2002-07-17)
... ...
FILE LIST -
zbufManip.c
DESCRIPTION -
This module illustrates the use of zbufLib routines, and their
effect on zbuf segments and data sharing. To keep the example
manageable, the zbuf data used is small, and the
execution environment is the Tornado shell.
RUNNING DEMO -
Place the zbufManip.c file in your dir. Depending on
the target you have, define the CPU in your compile line and use
the Makefile in the BSP dir. to compile.
To link in (and initalize) the zbuf socket interface, define
INCLUDE_ZBUF_SOCK in configAll.h.
To run this demo invoke the function zbufManip().
TESTED ON - Host/Target : Solaris 2.5.1 / mv1604
VxWorks : 5.3.1
EXAMPLE COMPILE LINE -
make CPU=PPC604 zbufManip.o
% make CPU=PPC604 zbufManip.o
ccppc -B/petaluma1/mayur/tor101-ppc/host/sun4-solaris2/lib/gcc-lib/
-mstrict-align -ansi -nostdinc -O2 -fvolatile -fno-builtin -fno-for-scope
-Wall -I/h -I. -I/petaluma1/mayur/tor101-ppc/target/config/all
-I/petaluma1/mayur/tor101-ppc/target/h
-I/petaluma1/mayur/tor101-ppc/target/src/config
-I/petaluma1/mayur/tor101-ppc/target/src/drv -DCPU=PPC604 -DMV1600
-DTARGET_DIR="\"mv1604\"" -c zbufManip.c
OUTPUTS/LOGFILE -
On VxWorks target:
==================
-> ld zbufManip()
value = 0 = 0x0
Output on the console:
======================
Inserting data from buff into the zbuf zId1.
Contents of buff -- I cannot repeat enough
Displaying contents of zId1:
segID 0x5f9d80 at 0x11ddbc + 0x0 (22 bytes): I cannot repeat enough
Copying contents of zId1 to zId2
segID 0x5f9f00 at 0x11ddbc + 0x0 (22 bytes): I cannot repeat enough
Now the copy has its own Id but uses the same address
Inserting a second buffer into the middle of the existing data
in zId1 gives us a zbuf made up of three segments.
Contents of buffer being entered is 'this'
segID 0x5f9d80 at 0x11ddbc + 0x0 (15 bytes): I cannot repeat
segID 0x5f9e00 at 0x11df6c + 0x0 ( 4 bytes): this
segID 0x5f9e80 at 0x11ddcb + 0x0 ( 7 bytes): enough
Because the underlying buffer is not modified both buff and the
duplicate zId2 still contain the original String.
Contents of buff: I cannot repeat enough
Contents of zId2: segID 0x5f9f00 at 0x11ddbc + 0x0 (22 bytes): I cannot repeat enough
近期下载者:
相关文件:
收藏者: