I just want to take a moment here to point out something.
Fair Use Statement
This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. Such material is made available in an effort to advance understanding of issues of environmental and humanitarian significance. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those who have expressed a prior interest in receiving the included information for research and educational purposes.
This was Intended to be a BSD only blog, but now it's about all Unix Like Free Operating Systems, Linux, FreeBSD etc.
Tuesday, October 20, 2009
Monday, October 19, 2009
My notes on TCP/IP stacks.
Please excuse, some if this is just stuff I grabed off of web sites for further investigation.
TCP/IP stacks
Mini TCP/IP stacks.
uIP http://www.sics.se/~adam/uip/index.php/Main_Page
lwIP http://savannah.nongnu.org/projects/lwip/ lwIP is significantly more complex
uC/IP http://sourceforge.net/projects/ucip/ uC/IP - TCP/IP for microcontrollers
Alpine - user space TCP/IP (have source code somewhere)
----------------
> i want to move tcp/ip stack(including routing and
> netfilter) to userspace, my goal is to trace all the
> instructions involved in a firewall and router since i
> don't know how to trace these instructions inside the
> kernel. i want to get something like:
>
> incoming ip packets(a file)-->fake ISR-->tcp/ip
> stack-->outgoing ip packets( to /dev/null).
>
> my question is: is it possible and relatively easy to
> move tcp/ip stack to user space?
This comes up fairly frequently, it might be a good addition to the FAQ.
Here's my attempt at an answer culled from prior messages.
Several people have user-mode network stacks at various levels of
development, but it is *highly* unlikely for them ever to get into
the kernel proper (see the monolithic versus microkernel debate at
http://www.kernel.org/pub/linux/docs/lkml/#s15-4).
Here are some URLs to which you can refer for more information:
http://www.cl.cam.ac.uk/Research/SRG/netos/arsenic/
http://www.cs.nwu.edu/~pdinda/minet/minet.html
http://www.joerch.org/tcpip/
http://freshmeat.net/projects/libutcp/
However, for security purposes, you probably do not want a user-mode stack.
You want an extensible packet handling mechanism, and can be found with:
iptables/ipchains -- the native Linux firewalling tools,
http://netfilter.samba.org/
tc -- the Traffic control program,
http://www.sparre.dk/pub/linux/tc/
libpcap -- packet capture library,
http://www.tcpdump.org
------------------------------
TCP/IP stacks
Mini TCP/IP stacks.
uIP http://www.sics.se/~adam/uip/index.php/Main_Page
lwIP http://savannah.nongnu.org/projects/lwip/ lwIP is significantly more complex
uC/IP http://sourceforge.net/projects/ucip/ uC/IP - TCP/IP for microcontrollers
Alpine - user space TCP/IP (have source code somewhere)
- UPDATE July 20, 2011:
- I found my Alpine code, but it's only the Alpine4Linux.
- The file can be downloaded from : http://www.dnull.com/Alpine/
- I'd like to put these up on source forge or at least something like box.net where the code can no longer get lost.
----------------
> i want to move tcp/ip stack(including routing and
> netfilter) to userspace, my goal is to trace all the
> instructions involved in a firewall and router since i
> don't know how to trace these instructions inside the
> kernel. i want to get something like:
>
> incoming ip packets(a file)-->fake ISR-->tcp/ip
> stack-->outgoing ip packets( to /dev/null).
>
> my question is: is it possible and relatively easy to
> move tcp/ip stack to user space?
This comes up fairly frequently, it might be a good addition to the FAQ.
Here's my attempt at an answer culled from prior messages.
Several people have user-mode network stacks at various levels of
development, but it is *highly* unlikely for them ever to get into
the kernel proper (see the monolithic versus microkernel debate at
http://www.kernel.org/pub/linux/docs/lkml/#s15-4).
Here are some URLs to which you can refer for more information:
http://www.cl.cam.ac.uk/Research/SRG/netos/arsenic/
http://www.cs.nwu.edu/~pdinda/minet/minet.html
http://www.joerch.org/tcpip/
http://freshmeat.net/projects/libutcp/
However, for security purposes, you probably do not want a user-mode stack.
You want an extensible packet handling mechanism, and can be found with:
iptables/ipchains -- the native Linux firewalling tools,
http://netfilter.samba.org/
tc -- the Traffic control program,
http://www.sparre.dk/pub/linux/tc/
libpcap -- packet capture library,
http://www.tcpdump.org
------------------------------
---------------------
I've started a syncookie fw using a daemon process ???
I do this using the REDIRECT ( ipchains ) / QUEUE ( ipfilter ) targets,
to get the packets to userspace. Once there, you can do what you want
using libpcap or syuscalls.
-------------------------------------------------------
[10] C.A. Thekkath, T.D. Nguyen, E.Moy and E.D.
Lazowska, ‘Implementing Network Protocols at User
Level,’ in Proceedings SIGCOMM 1993,
San Francisco, pp. 64-73, September, 1993.
[13] C. Maeda and B.N. Bershad, ‘Protocol service
decomposition for high-performance networking,’ in
14th ACM Symposium on Operating Systems
Principles, December 1993.
------------------------------------------------------
[15] G.L. Peterson, “Myths about the mutual exclusion
problem,’ in Information Processing Letters, Vol. 12,
No. 3, pp. 115-116, June 1981.
A Appendices
A.1 Peterson’s algorithm
Peterson’s algorithm for mutual exclusion between two
processes is as follows (also see [15]):
Lock()
{
wantAccess[ME]=TRUE;
nextAccess=YOU;
while (wantAccess[YOU] && nextAccess==YOU)
/* Add yield code here */
;
}
Release()
{
wantAccess[ME]=0;
}
A.2 Edwards’ Algorithm
This algorithm for mutual exclusion exploits the fact that
the child process runs at real-time priority and so cannot be
pre-empted by the user process:
Lock()
{
#ifdef CHILD_PROCESS
if (disable_child) {
/* If user process has disabled us
* then we block and wait for him to
* wake us up
*/
child_blocking=TRUE;
WaitOnSemaphoreForWakeup();
}
#else
/* We know child must be blocked at the
* moment (thus not holding lock) as it
* runs as a real-time priority so can
* not be pre-empted
*/
disable_child=TRUE;
#endif
}
Release()
{
#ifdef CHILD_PROCESS
if (wakeup_user_process) {
WakeupSleepingUserProcess();
}
#else
disable_child=FALSE;
if (child_blocking) {
child_blocking=FALSE;
SignalWaitSemaphore();
}
#endif
}
-------------------------------------------
http://www.vzavenue.net/~neelnatu/alpine4linux/alpine4linux.txt
--------------------------------------------------
Neelkanth Natu (neelnatu@yahoo.com)
Hi all,
Alpine4Linux is a userlevel FreeBSD 4.8 networking stack running on top of a stock Linux kernel. It is an implementation of an idea that I came across in a paper[1] by David Ely, Stefan Savage and David Wetherall.
Alpine4Linux consists of a userland server program that runs the FreeBSD kernel code as well as
the unmodified networking stack. Client programs use the Alpine stack by setting the LD_PRELOAD
environment variable to link to libraries, that intercept socket related system calls. These
intercepted system calls are routed to the Alpine server over a TCP connection established on the loopback interface.
Alpine4Linux goes great lengths to ensure that its behavior is identical to that of a FreeBSD
kernel as far as networking is concerned. Thus, in addition to the unmodified FreeBSD stack.
Alpine4Linux also has unmodified socket layer code, file descriptor code, tsleep and wakeup for
e.g. It also has a rich client-side library that supports almost all socket functions as well as
functions like fork() that are commonly used by server programs.
I have tested stock Linux programs like telnet, nmap, ifconfig, vsftpd-1.1.3 etc. against
the Alpine stack. I have only compiled it on a Redhat 8.x Linux box, so if someone manages to run it on another Linux distribution/kernel please let me know.
You can find more information at: http://www.vzavenue.net/~neelnatu/alpine4linux
Hopefully someone finds use for this.
thanks
Neel
[1] Alpine: A user-level infrastructure for network protocol development
David Ely, Stefan Savage, David Wetherall
http://alpine.cs.washington.edu/
----------------------------------------------------------
Application-L evel Protocol Infrastructure for Network Experimentation
alpine_debug.c
Alpine_FreeBSD3x-0.10.tar.gz.
http://web.archive.org/web/20050208075748/http://alpine.cs.washington.edu/distfiles/Alpine_FreeBSD3x-0.10.tar.gz
-----------------------
![]()
--------------
TCP_congestion_avoidance_algorithm
http://www.cs.arizona.edu/projects/protocols/
http://en.wikipedia.org/wiki/TCP_Vegas
http://en.wikipedia.org/wiki/TCP_congestion_avoidance_algorithm
TCP Tahoe and Reno
TCP Vegas
TCP New Reno
TCP Hybla high-latency terrestrial or satellite radio link
TCP BIC In linux 2.6.8 through 2.6.18
TCP CUBIC In linux since version 2.6.19
Compound TCP (CTCP) is a Microsoft algorithm that is part of the Windows Vista and Window Server 2008 TCP
YeAH TCP - Yet Another Highspeed TCP - Linux
2.6.22
TCP Illinois congestion control. This is an implementation of TCP Illinois invented by Shao Liu at University of Illinois. It is a another variant of Reno which adapts the alpha and beta parameters based on RTT. The basic idea is to increase window less rapidly as delay approaches the maximum. See the papers and talks to get a more complete description
YeAH-TCP congestion control algorithm implementation. YeAH-TCP is a sender-side high-speed enabled TCP congestion control algorithm, which uses a mixed loss/delay approach to compute the congestion window. It's design goals target high efficiency, internal, RTT and Reno fairness, resilience to link loss while keeping network elements load as low as possible. For further details look here: http://wil.cs.caltech.edu/pfldnet2007/paper/YeAH_TCP.pdf
TCP cubic update for 2.6.22. The new version improves on its scalability, fairness and stability. So in all properties, we confirmed it shows better performance
Fastsoft
http://www.fastsoft.com/downloads/FASTTCP-IEEENetwork-0501.pdf
-----------------------------------
http://www.sics.se/~adam/miniweb/
[FIXME: Is there a better file for me to keep this category ?]
web appliances
---------------------------------------
By 1999, the first P2P (peer-to-peer) application called Swarmcast began to blatantly exploit Jacobson’s TCP congestion control mechanism. Using a technique called “parallel incremental downloading”, Swarmcast could grab a much larger share of the pie at the expense of others by exploiting the multi-stream and persistence loophole. These two loopholes would be used by every P2P application since.
I've started a syncookie fw using a daemon process ???
I do this using the REDIRECT ( ipchains ) / QUEUE ( ipfilter ) targets,
to get the packets to userspace. Once there, you can do what you want
using libpcap or syuscalls.
-------------------------------------------------------
[10] C.A. Thekkath, T.D. Nguyen, E.Moy and E.D.
Lazowska, ‘Implementing Network Protocols at User
Level,’ in Proceedings SIGCOMM 1993,
San Francisco, pp. 64-73, September, 1993.
[13] C. Maeda and B.N. Bershad, ‘Protocol service
decomposition for high-performance networking,’ in
14th ACM Symposium on Operating Systems
Principles, December 1993.
------------------------------------------------------
[15] G.L. Peterson, “Myths about the mutual exclusion
problem,’ in Information Processing Letters, Vol. 12,
No. 3, pp. 115-116, June 1981.
A Appendices
A.1 Peterson’s algorithm
Peterson’s algorithm for mutual exclusion between two
processes is as follows (also see [15]):
Lock()
{
wantAccess[ME]=TRUE;
nextAccess=YOU;
while (wantAccess[YOU] && nextAccess==YOU)
/* Add yield code here */
;
}
Release()
{
wantAccess[ME]=0;
}
A.2 Edwards’ Algorithm
This algorithm for mutual exclusion exploits the fact that
the child process runs at real-time priority and so cannot be
pre-empted by the user process:
Lock()
{
#ifdef CHILD_PROCESS
if (disable_child) {
/* If user process has disabled us
* then we block and wait for him to
* wake us up
*/
child_blocking=TRUE;
WaitOnSemaphoreForWakeup();
}
#else
/* We know child must be blocked at the
* moment (thus not holding lock) as it
* runs as a real-time priority so can
* not be pre-empted
*/
disable_child=TRUE;
#endif
}
Release()
{
#ifdef CHILD_PROCESS
if (wakeup_user_process) {
WakeupSleepingUserProcess();
}
#else
disable_child=FALSE;
if (child_blocking) {
child_blocking=FALSE;
SignalWaitSemaphore();
}
#endif
}
-------------------------------------------
http://www.vzavenue.net/~neelnatu/alpine4linux/alpine4linux.txt
- UPDATE July 20, 2011:
- I found my Alpine code, but it's only the Alpine4Linux.
- The file can be downloaded from : http://www.dnull.com/Alpine/
--------------------------------------------------
Date: Fri, 30 May 2003 11:53:23 -0700 (PDT) To: freebsd-net@freebsd.orgnatun@rpi.edu or neelnatu@yahoo.com
Neelkanth Natu (neelnatu@yahoo.com)
Hi all, Alpine4Linux is a userlevel FreeBSD 4.8 networking stack running on top of a stock Linux kernel. It is an implementation of an idea that I came across in a paper[1] by David Ely, Stefan Savage and David Wetherall.
Alpine4Linux consists of a userland server program that runs the FreeBSD kernel code as well as
the unmodified networking stack. Client programs use the Alpine stack by setting the LD_PRELOAD
environment variable to link to libraries, that intercept socket related system calls. These
intercepted system calls are routed to the Alpine server over a TCP connection established on the loopback interface.
Alpine4Linux goes great lengths to ensure that its behavior is identical to that of a FreeBSD
kernel as far as networking is concerned. Thus, in addition to the unmodified FreeBSD stack.
Alpine4Linux also has unmodified socket layer code, file descriptor code, tsleep and wakeup for
e.g. It also has a rich client-side library that supports almost all socket functions as well as
functions like fork() that are commonly used by server programs.
I have tested stock Linux programs like telnet, nmap, ifconfig, vsftpd-1.1.3 etc. against
the Alpine stack. I have only compiled it on a Redhat 8.x Linux box, so if someone manages to run it on another Linux distribution/kernel please let me know.
You can find more information at: http://www.vzavenue.net/~neelnatu/alpine4linux
Hopefully someone finds use for this.
thanks
Neel
[1] Alpine: A user-level infrastructure for network protocol development
David Ely, Stefan Savage, David Wetherall
http://alpine.cs.washington.edu/
----------------------------------------------------------
Application-L evel Protocol Infrastructure for Network Experimentation
alpine_debug.c
Alpine_FreeBSD3x-0.10.tar.gz.
http://web.archive.org/web/20050208075748/http://alpine.cs.washington.edu/distfiles/Alpine_FreeBSD3x-0.10.tar.gz
-----------------------
TCP_congestion_avoidance_algorithm
http://www.cs.arizona.edu/projects/protocols/
http://en.wikipedia.org/wiki/TCP_Vegas
http://en.wikipedia.org/wiki/TCP_congestion_avoidance_algorithm
TCP Tahoe and Reno
TCP Vegas
TCP New Reno
TCP Hybla high-latency terrestrial or satellite radio link
TCP BIC In linux 2.6.8 through 2.6.18
TCP CUBIC In linux since version 2.6.19
Compound TCP (CTCP) is a Microsoft algorithm that is part of the Windows Vista and Window Server 2008 TCP
YeAH TCP - Yet Another Highspeed TCP - Linux
2.6.22
TCP Illinois congestion control. This is an implementation of TCP Illinois invented by Shao Liu at University of Illinois. It is a another variant of Reno which adapts the alpha and beta parameters based on RTT. The basic idea is to increase window less rapidly as delay approaches the maximum. See the papers and talks to get a more complete description
YeAH-TCP congestion control algorithm implementation. YeAH-TCP is a sender-side high-speed enabled TCP congestion control algorithm, which uses a mixed loss/delay approach to compute the congestion window. It's design goals target high efficiency, internal, RTT and Reno fairness, resilience to link loss while keeping network elements load as low as possible. For further details look here: http://wil.cs.caltech.edu/pfldnet2007/paper/YeAH_TCP.pdf
TCP cubic update for 2.6.22. The new version improves on its scalability, fairness and stability. So in all properties, we confirmed it shows better performance
Fastsoft
http://www.fastsoft.com/downloads/FASTTCP-IEEENetwork-0501.pdf
-----------------------------------
http://www.sics.se/~adam/miniweb/
web-enabled embedded systems
Many devices (printers, etc.) now use not just standard Internet Protocol but have a small web server embedded in them for input and to indicate status rather than using floppy disks or LCD panels or tiny little keyboards or other proprietary communication protocols.[FIXME: Is there a better file for me to keep this category ?]
web appliances
- Stanford University Wearable Computing Laboratory World's Smallest Operational Web Server (to date) http://wearables.stanford.edu/
- Embedded Ethernet: vendors that have Ethernet on their microcontrollers. http://microcontroller.com/EmbeddedSystems.asp?c=21
- ~$77 USD http://www.dontronics.com/projecsystems.htmlsmall, solid-state Web server with 32k nonvolatile memory, 2 A/D inputs for 0-5v measurement, etc. recommends _TCP/IP Lean: Web Servers for Embedded Systems_ book by Jeremy Bentham.
- Tiny TCP/Tiny WEB Servers/etc. http://unusualresearch.com/tinytcp/tinytcp.htm
- Embedded systems as web servers(!) see _Personal Engineering_ http://www.pein.com/1996 Dec p. 8 "The shrinking Web server" article by Russ Lindgren;
- Connecting an M68HC08 Family Microcontroller to an Internet Service Provider (ISP) Using the Point-to-Point Protocol (PPP) http://e-www.motorola.com/brdata/PDFDB/docs/AN2120.pdf
- TINI: Tiny InterNet Interface http://www.ibutton.com/TINI/
- embedded web server http://www.jumptec.de/"world's smallest web server" looks like it's slightly smaller than a deck of playing cards.
- ``An Embeddable HTTP Server: Web-enabling embedded devices'' article by M. Tim Jones _Dr. Dobb's Journal_ October 2001 http://www.ddjembedded.com/resources/articles/2001/0110h/0110h.htm
- http://www.suroot.net/html/article.php?sid=87&mode=thread&order=0&thold=0`` uIP ... is probably the smallest TCP/IP stack ever written in a high level language. uIP is written in the C programming language and the source code is free to distribute and use for both non-commercial and commercial use (the full BSD-style license is here). Follow the link near the bottom of the page for a c64 running as a web server. '' http://sourceforge.net/projects/ucip/
- IPic - A Match Head Sized Web-Server http://www-ccs.cs.umass.edu/~shri/iPic.html"this chip includes a web-server, which I do believe to be the smallest web-server -- in physical size as well as in code-size. " (has lots of links to other small embedded web servers, including one that runs on the C64)
- uWebserver http://www.mycal.net/wsweb/
- An Internet Oven Monitor by Bill Eichin http://www.elecdesign.com/Pages/magpages/dec1799/ifd/1217ifd1.htm
I hear "netcat" could be useful. ftp://avian.org/src/hacks/nc110.tgz
Other than Apache, http://www.imatix.com/also has a free web server. Lots of open source software here.
anonymous proxy server in 100 lines of Perl http://www.ics.uci.edu/pub/websoft/libwww-perl/archive/1996h2/0404.html
- http://www.barnnetwork.com/barnnet/has a embedded system that displays status via the web.
- the article '$25 Web Server' on www.circuitcellar.com/online ???
- Embedded Internet Workshop http://www.circuitcellar.com/eiw_proc/proceedings.htmEmbedded Web Servers
- Atmel Corp. http://www.atmel.com/and emWare Inc. http://www.emware.com/are integrating emWare's EMIT (Embedded Micro Internetworking Technology) software with Atmel's 8 bit Flash AVR microcontrollers ... so "developers can quickly create Internet-enabled embedded networks for AVR-controlled electronic devices ... user interfaces can be a ... standard web browser ... through a remote web server, a directly connected laptop, or a PDA." -- from article in _Electronic Design_ http://www.elecdesign.com/1998-11-01.
- Patriot Scientific Corporation http://www.ptsc.com/interesting radar systems, designed native Java "shBoom(tm) microprocessor for "embedded web servers". http://www.circuitcellar.com/articles/misc/tom-92.pdf
- http://www.zdnet.com/anchordesk/story/story_2363.htmlweb-enabled embedded systems
- QNX Software Systems Ltd. (QSSL) a demo that fits a full HTML 3.2 browser, POSIX-certified real-time OS, windowing system, TCP/IP, embedded Web server, Internet dialer, text editor, file browser and other applications onto a single, self-booting 1.44 MB floppy. ... using less than 2 MB of RAM and 4 MB of ROM ... You can download the demo from Internet Appliance Toolkit (AIT) http://www.qnx.com/iat... the Odin Reference Design Kit "all the hardware you need ... NTSC TV and SVGA monitor out, PC Card socket ... fax/modem, Ethernet, ... schematics ... bill of material ... to build a full-featured Internet appliance for under $200 ... with Odin and the AIT" ... Odin from National Semiconductor http://www.national.com/ns486... -- from advertisement in _Computer Design_ http://www.computer-design.com/1997 Nov
- U S Software http://www.ussw.com/Hillsboro, OR sells TCP/IP protocol suite for many embedded processors.
---------------------------------------
Fixing the Unfairness of TCP Congestion Control
"George Ou, Technical Director of ZDNet, has an analysis today of an engineering proposal to address congestion issues on the internet. It's an interesting read, with sections such as "The politicization of an engineering problem" and "Dismantling the dogma of flow rate fairness". Short and long term answers are suggested, along with some examples of what incentives it might take to get this to work. Whichever side of the neutrality debate you're on, this is worth consideration."By 1999, the first P2P (peer-to-peer) application called Swarmcast began to blatantly exploit Jacobson’s TCP congestion control mechanism. Using a technique called “parallel incremental downloading”, Swarmcast could grab a much larger share of the pie at the expense of others by exploiting the multi-stream and persistence loophole. These two loopholes would be used by every P2P application since.
Mobile-ITX new super small PC motherboard form factor
This is a new standard PC motherboard form factor that is almost the same size as a cell phone.
http://www.linuxdevices.com/ news/NS2010384636.html
Via CEO Wenchi Chen revealed a business card-sized motherboard billed as the "world's first industry-standard form-factor for PC/phone convergence," at Computex today. The "mobile-ITX" board measures 3 x 1.8 inches -- half the size of Via's "pico-ITX" form-factor -- and runs Linux or Windows XP Embedded.
The mobile-ITX board that Chen demonstrated this morning appears to be based on a 1GHz "C7-S" processor -- apparently a standard Via C7-M shoe-horned into a 9 x 11mm package. The chip had not previously been announced. The mobile-ITX board also apparently uses an "S" (small) version of the CX700 integrated north-/south-bridge chipset. And, it appears to have an on-board DC-DC converter. Additionally, according to Via, the board includes a CDMA baseband processor chip, suggesting that the mobile-ITX board could be used as the basis for x86-compatible smartphones.
According to a brief item at EpiaCenter, Via's mobile-ITX board will be available with 256MB or 512MB of RAM soldered on-board, and will run Linux or Windows XP Embedded. Even an embedded version of Windows Vista may be too much for the little board, however, a Via spokesperson admits.
Chen stated, "This prototype Mobile-ITX gives a glimpse into the future of ultra mobile devices and the real convergence of computing and communications. Yet this is only the start. We see the platform shrinking still further, with ever richer blends of functionality, that will truly make ultra mobility the normal way of enjoying our content and our communications."
http://www.linuxdevices.com/
Via CEO Wenchi Chen revealed a business card-sized motherboard billed as the "world's first industry-standard form-factor for PC/phone convergence," at Computex today. The "mobile-ITX" board measures 3 x 1.8 inches -- half the size of Via's "pico-ITX" form-factor -- and runs Linux or Windows XP Embedded.
Via's mobile-ITX board prototype
(Click to enlarge)
(Click to enlarge)
The mobile-ITX board that Chen demonstrated this morning appears to be based on a 1GHz "C7-S" processor -- apparently a standard Via C7-M shoe-horned into a 9 x 11mm package. The chip had not previously been announced. The mobile-ITX board also apparently uses an "S" (small) version of the CX700 integrated north-/south-bridge chipset. And, it appears to have an on-board DC-DC converter. Additionally, according to Via, the board includes a CDMA baseband processor chip, suggesting that the mobile-ITX board could be used as the basis for x86-compatible smartphones.
Motorola phone compared to mobile-ITX
According to a brief item at EpiaCenter, Via's mobile-ITX board will be available with 256MB or 512MB of RAM soldered on-board, and will run Linux or Windows XP Embedded. Even an embedded version of Windows Vista may be too much for the little board, however, a Via spokesperson admits.
Chen stated, "This prototype Mobile-ITX gives a glimpse into the future of ultra mobile devices and the real convergence of computing and communications. Yet this is only the start. We see the platform shrinking still further, with ever richer blends of functionality, that will truly make ultra mobility the normal way of enjoying our content and our communications."
Marketing Manager Tim Brown with Via's NanoBook UMPC reference design, and CEO Chen with mobile-ITX prototype
(Click to enlarge)
(Click to enlarge)
Given that Chen positioned mobile-ITX as an "industry standard," lots of technical specifications about the form-factor should become available shortly. Meanwhile, EpiaCenter has posted a few photos, and a video, here.
make depends
Dependency Management
The irony of Makehttp://www.ddj.com/linux-open- source/184406479
Advanced Auto-Dependency Generation
http://make.paulandlesley.org/ autodep.html
The irony of Makehttp://www.ddj.com/linux-open-
Advanced Auto-Dependency Generation
http://make.paulandlesley.org/
The Linux Kernel API
Documentation on many of the kernel API calls, with some searching I Found some excellent pages on this.
http://www.gnugeneration.com/ books/linux/2.6.20/kernel-api/
http://tldp.org/LDP/lkmpg/2.6/ html/index.html
http://kernelnewbies.org/ KernelHacking
http://www. advancedlinuxprogramming.com/ alp-folder
Linux USB drivers — Understanding and developing Linux USB drivers
Embedded Linux optimizations — Optimizing the Linux kernel and applications for speed, size, RAM, power and cost.
http://free-electrons.com/ articles
Advanced Linux Programming
http://en.wikibooks.org/wiki/ Linux_kernel
http://www.gnugeneration.com/
http://tldp.org/LDP/lkmpg/2.6/
http://kernelnewbies.org/
http://www.
Linux USB drivers — Understanding and developing Linux USB drivers
Embedded Linux optimizations — Optimizing the Linux kernel and applications for speed, size, RAM, power and cost.
http://free-electrons.com/
Advanced Linux Programming
http://en.wikibooks.org/wiki/
millisecond tick in C++
To compile run
g++ -l pthread -o millisecondtick millisecondtick.cpp
Turned out I had to use one static member function to jump off onto another to get up and running.
g++ -l pthread -o millisecondtick millisecondtick.cpp
Turned out I had to use one static member function to jump off onto another to get up and running.
/* millisecondtick.cpp
* Creates Millisecond Tick
*/
#include
#include
#include
#include "millisecondtick.h"
MilliSecond_Tick::MilliSecond_Tick(){
Running = FALSE;
};
void* MilliSecond_Tick::runx(void *pMilliSecond_Tick){
((MilliSecond_Tick*)pMilliSecond_Tick)->run(NULL);
}
int MilliSecond_Tick::start( pFnVoid func ){
pFnVoidVoid prun;
prun = runx;
if (MilliSecond_Tick::Running != FALSE){
printf("Error MilliSecond_Tick already started, can not start second instance\n");
return 0 ;
}
callback = func;
pthread_create(&tid, NULL, prun , this);
Running = TRUE;
return 0;
}
void MilliSecond_Tick::stop(){
MilliSecond_Tick::Running = FALSE;
pthread_join(tid, NULL);
}
void MilliSecond_Tick::tick(){
(*callback)();
}
void* MilliSecond_Tick::run(void * nothing){
struct sched_param sparam;
sparam.sched_priority = sched_get_priority_max(SCHED_FIFO);
if (pthread_setschedparam(pthread_self(), SCHED_FIFO, &sparam) == 0) {
// success, this application has sufficient privileges
}
else {
// setting priority failed, probably due to insufficient privieges
}
for (;;) { // for-ever loop of the ticker thread
static const struct timespec nanowait = {0, 0*1000*1000}; // 1 ms
nanosleep(&nanowait, (struct timespec *)0);
if (Running == FALSE){
break;
}
tick();
}
}
void tickss( ){
static int x = 0, y = 0;
x++;
if (x > 1000){
x = 0;
y++;
printf(">%d\n",y);
}
}
int main(){
MilliSecond_Tick cmt;
cmt.start(&tickss );
sleep(10);
cmt.stop();
} // millisecondtick.h
#include
#define TRUE 1
#define FALSE 0
typedef void(*pFnVoid)();
typedef void*(*pFnVoidVoid)( void *);
class MilliSecond_Tick
{
private:
int Running;
pFnVoid callback;
pthread_t tid;
static void *runx(void *pMilliSecond_Tick);
void tick();
public:
MilliSecond_Tick();
~MilliSecond_Tick(){};
int start( pFnVoid func ) ;
void stop();
void * run(void * nothing);
};
Wednesday, September 30, 2009
Virtual Hosting and other hosting.
http://www.tektonic.net/ is offering Linux hosting starting at $15 a month. You get to be root on your own virtual server.
starts at 20Gig, disk space seem very expensive from them as you expand.
I am running 2 Co-Lo's now on FreeBSD. They never have problems, but it's an interesting prospect to get a virtual server, one of my friends is moving off the free Colo to one, basically because it offers compartmentalization for his customers.
IPOWERWEB offers dedicated server hosting for $129 a month
But they offer regular FreeBSD web hosting through there GUI interface for $5.95 a month, I have a program on source forge rtelnet that allows you to open shell access on there web hosting accounts but there isn't much you can do on there boxes. Still it will run FreeBSD binaries that you can compile at home and upload to the CGI dir.
Other interesting crap to put on the virtual server.
FROM Wiki - Fetchmail is an open-source software utility for POSIX-compliant operating systems which is used to retrieve e-mail from a remote POP3, IMAP, ETRN or ODMR mail server to the user's local system. It was developed from the popclient program, written by Carl Harris. Its chief significance is perhaps that its author, Eric S. Raymond, used it as a model to discuss his theories of open source software development in a widely-read and influential essay on software development methodologies, The Cathedral and the Bazaar.
Web GUI mail packages (it's PHP)
http://www.horde.org/
http://www.horde.org/imp/
Horde is a PHP-based Web application framework.
It offers applications such as the Horde IMP email client, a groupware package (calendar, notes, tasks, file manager), a wiki and a time and task tracking software.
starts at 20Gig, disk space seem very expensive from them as you expand.
I am running 2 Co-Lo's now on FreeBSD. They never have problems, but it's an interesting prospect to get a virtual server, one of my friends is moving off the free Colo to one, basically because it offers compartmentalization for his customers.
IPOWERWEB offers dedicated server hosting for $129 a month
But they offer regular FreeBSD web hosting through there GUI interface for $5.95 a month, I have a program on source forge rtelnet that allows you to open shell access on there web hosting accounts but there isn't much you can do on there boxes. Still it will run FreeBSD binaries that you can compile at home and upload to the CGI dir.
NOTE: I deliberately put a very simple bug in rtelnet to keep out the kiddies. It's really easy to fix. But I just don't want this to get misused by people that are really clueless.
Other interesting crap to put on the virtual server.
FROM Wiki - Fetchmail is an open-source software utility for POSIX-compliant operating systems which is used to retrieve e-mail from a remote POP3, IMAP, ETRN or ODMR mail server to the user's local system. It was developed from the popclient program, written by Carl Harris. Its chief significance is perhaps that its author, Eric S. Raymond, used it as a model to discuss his theories of open source software development in a widely-read and influential essay on software development methodologies, The Cathedral and the Bazaar.
Web GUI mail packages (it's PHP)
http://www.horde.org/
http://www.horde.org/imp/
Horde is a PHP-based Web application framework.
It offers applications such as the Horde IMP email client, a groupware package (calendar, notes, tasks, file manager), a wiki and a time and task tracking software.
Monday, March 17, 2008
frustrating

Reading computer manuals without the hardware is as frustrating as
reading sex manuals without the software.
Arthur C. Clarke
Where do I begin. I am forced further and further from BSD land into Linux. Where completely messed up ways of doing things seem to be the norm.
Work queues, kernel threads, and the like seem fundamentally wrong to me. We just dealt with a dead lock condition in the USB Gadget driver last week. Still struggling to understand what is causing spurious interrupts on the MMC driver in this 2.6.15 Linux Kernel we are running on an ARM platform. Odd think is that it's fine in debug mode, just happens in non-debug. Murphy's law certainly applies here. This whole Initrd business is just messy also.
But it's not all griping about Linux, I just set up a New 1TB FreeBSD 6.3 based server. Somehow I feel like that project has taken a turn for the worst. As much as I didn't really care much for Jordan Hubbard, he did manage to do a good job of things overall.
I thought I'd try some new tricks on the box, since it's in a CoLo some 500 miles from home it's a little hard to operate, and rebooting and moving cables or pressing F1 at boot time is just not going to happen.
So I installed Xvnc, very cool thing, usually I'd just open X-terms across the net to work, or more lately tunnel Xterms over ssh, ssh -R 6001:127.0.0.1:6000 sokol@192.168.1.116 http://x.unixprogram.com/ Someday I will make a real site out of that.
Then I bring up olvwm and Firefox. Now overall this is very cool, since I can leave all my Xterms open and connect using VNC and my whole desktop is right where I left it even though I changes locations and computers, even screen resolutions.
My gripe is FireFox on FreeBSD is just 1/2 operations compared to where it's at on Linux.
Or maybe I should say the FireFox is fine, but lacking operational plug-ins.
I just haven't been able to get Java and Flash, or Acrobat working right, in Ubuntu this is a no brainer. In addition Firefox is spewing a stream of error messages at the console that I opened it with. I am not a happy camper, that's for sure.
Now overall I swear by firefox, and the fact that none of these companies or Firefox itself is really paying much attention to FreeBSD is disturbing, maybe even a lack of diplomacy that used to exist under Jordans participation. Mozilla used to do a good job with FreeBSD support including most plugins. Maybe I Need to turn on Linux Support in the BSD kernel and run all linux binaries. Yuck.
On another note. I have found it interesting at the response I get from Linux people. I find I can still run circles around most of them even being someone out of place in the Linux Kernel, but already I have my name in the 2.6.17 kernel and later on the ViVi driver. I have done about half a dozen driver since then. And having had come from a Pre-threaded kernel world, I can do much better jobs at driver interrupts and getting things to work better for real time stuff.
Oh there is also some really interesting TCP/IP socket call stuff I came across to, specifically how long a process spends doing a "write" or "Send" call. It's very different then I had expected. and Both FreeBSD and Linux exhibited similar behavior. This was that even Non-blocking calls can take a very long time to write. Something on the order of 200+ uS. Didn't seems to matter if it was blocking or non-blocking either. And it took even longer with Nagel disabled!.
Blocking was only fast if the socket was really going to block, then the non-blocking would return in 1uS or less even!
200 Micro Seconds, heck that a long time. What the hell is the kernel doing for that time, and it seems to be burning up CPU that whole time no less. I alway just assumed it would take that buffer and put it in some queue and return immediately.
Anyhow that for was 100 to 1000 bytes sends at 1 second intervals.
When I started sending data full out at 10Mbps or higher, this delay for the write calls dropped down to 2ouS or less even. How is that for odd. the more data I send the faster the send call gets! Exactly opposite of what I would have expected.
Monday, July 09, 2007
Please don't spam in my comments here.
I can't believe people are spamming into blog comments now.
It's there no end. I don't want your stock, Viagra, mass mail service, hoodia, Rolex watches or what ever other crap your selling, nor do my readers want this.
On that note, go to my sites and click on all the Google adds you can please.
Seriously, I have Unix Program.com and C-program.com for some notes on programming and development. Unix program also has a good image collection, please don't link to these from your myspace page.
As much as I am pro-BSD, I have had to start doing more and more Linux development. My name is in the Linux Kernel since 2.6.17 on the VIVI driver.
I guess at some level they are on the same side of the battle as us BSDers.
It's there no end. I don't want your stock, Viagra, mass mail service, hoodia, Rolex watches or what ever other crap your selling, nor do my readers want this.
On that note, go to my sites and click on all the Google adds you can please.
Seriously, I have Unix Program.com and C-program.com for some notes on programming and development. Unix program also has a good image collection, please don't link to these from your myspace page.
As much as I am pro-BSD, I have had to start doing more and more Linux development. My name is in the Linux Kernel since 2.6.17 on the VIVI driver.
I guess at some level they are on the same side of the battle as us BSDers.
"I must say the linux community is a lot nicer than the unix
community. a negative comment on unix would warrent death
threats. with linux, it is like stirring up a nest of butterflies."
-- Ken Thompson. 1999
Checkout my junk box /dev/null
And also my Main Blog http://johnsokol.blogspot.com/
Wednesday, December 20, 2006
Another Microsoft Word Code Execution Exploit
Suddenly, up pops: Hackie
"I see that you are trying to craft an exploit. Would you like me to assist?" <blink, blink>
"I see that you are trying to craft an exploit. Would you like me to assist?" <blink, blink>
Monday, October 23, 2006
Change != Improvement
Moving to Linux is like getting poked in the eye with a stick.
It hurts and I can't see where I am going.
But I have to, BSD is a victim of it's own success. It has been so reliable there just isn't any work out there to maintain BSD systems. Sort of like building cars that run forever, you'd put your self out of business.
I think we BSD people have put ourselves out of work by making these systems too reliable and simple to use.
So as a result, I have been doing more and more Linux projects. After all it's C and Unix like, doing a device driver in Linux isn't that hard right? Well it's not, if you can get the dam OS to run in the first place.
I find it's always the same crap. They keep changing things, moving things and renaming things so you can never count on things working the same way on any two distros, versions, shells, /etc, file trees, driver interfaces or really anything in the box.
Like instead of Mbuf's there called skbuff's for there network driver. But it's beyond just renaming away from SVR4 and BSD-ism's , but even between kernel versions.
Things like renaming pci_find_class to pci_get_class, pci_dev->slot_name to pci_dev->dev.bus_id and remap_page_range to remap_pfn_range around 2.6.10 that broke almost ever driver in Linux! I mean these were needed to Port an existing driver up to a newer kernel within the 2.6.x tree, it only took me a week to figure out these thing, and I couldn't' find much documentation on these changes. What they hell are they thinking!!
Changing "find" to "get" is not an UPGRADE! It's not helping anyone and cost hundreds of thousands of man hours for all of the sysadmins and developers out there that were burned on this.
I am now working with the Author of the BASH shell. Him, his 3 uber geeks and myself could not figure out how to set up a static IP on a server here! They eventually got it after a few hours. Hell this is like a 1 minute thing in FreeBSD.
It's doesn't just end there.
I have about 10 systems at home.
4 FreeBSD, 3 Linux and 3 windows systems.
In the past 12 months, I have never had to install, rebuild, update or do any maintenance on the FreeBSD boxes. They are also the boxes I do most of my work on.
I have had to reinstall windows twice, and ended up not ever getting some DVR software working on one box and have in general had to spend a lot of time tweaking the boxes to keep running.
With Linux I have installed Fedora Core 4, 8 times, each installed work for about 2 weeks to 2 month before getting Segfaults while running, then become unable to reboot. I was unable to even read my data back off of the driver. Fortunately I had made tar files backed up on my FreeBSD boxes.
I have also installed Ubuntu twice, both installed systems were a big hassle to get the C compiler and dev environment working.
Even those aren't running very well, crashing every few days.
The thing that really get me though was I have been trying to get a 2.4.X distro working. I have tried Debian, Gentoo and Slackware to no avail.
Two weeks of manually partitioning and having CD only distro's insists on access to the net, while not detecting the network card on My 3 year old Via EPIA M10K motherboard. I really am pulling my hair out.
I have tried everything and just can't get a dam distro to just install and run correctly.
I really need to work on a driver, and a very simple one at that. If only I can just get past the dam basic install!!!
In my team I have Debian members, and a current maintainer in the Linux kernel who also didn't' fair a whole lot better at getting and only distro installed, but at least one had a working system he found from 3 years ago that was already good to go.
So it's not just me, but I find it far more frustrating and infuriating spending weeks to get a dam OS installed.
Such has been my adventure with Linux.
It hurts and I can't see where I am going.
But I have to, BSD is a victim of it's own success. It has been so reliable there just isn't any work out there to maintain BSD systems. Sort of like building cars that run forever, you'd put your self out of business.
I think we BSD people have put ourselves out of work by making these systems too reliable and simple to use.
So as a result, I have been doing more and more Linux projects. After all it's C and Unix like, doing a device driver in Linux isn't that hard right? Well it's not, if you can get the dam OS to run in the first place.
I find it's always the same crap. They keep changing things, moving things and renaming things so you can never count on things working the same way on any two distros, versions, shells, /etc, file trees, driver interfaces or really anything in the box.
Like instead of Mbuf's there called skbuff's for there network driver. But it's beyond just renaming away from SVR4 and BSD-ism's , but even between kernel versions.
Things like renaming pci_find_class to pci_get_class, pci_dev->slot_name to pci_dev->dev.bus_id and remap_page_range to remap_pfn_range around 2.6.10 that broke almost ever driver in Linux! I mean these were needed to Port an existing driver up to a newer kernel within the 2.6.x tree, it only took me a week to figure out these thing, and I couldn't' find much documentation on these changes. What they hell are they thinking!!
Changing "find" to "get" is not an UPGRADE! It's not helping anyone and cost hundreds of thousands of man hours for all of the sysadmins and developers out there that were burned on this.
I am now working with the Author of the BASH shell. Him, his 3 uber geeks and myself could not figure out how to set up a static IP on a server here! They eventually got it after a few hours. Hell this is like a 1 minute thing in FreeBSD.
It's doesn't just end there.
I have about 10 systems at home.
4 FreeBSD, 3 Linux and 3 windows systems.
In the past 12 months, I have never had to install, rebuild, update or do any maintenance on the FreeBSD boxes. They are also the boxes I do most of my work on.
I have had to reinstall windows twice, and ended up not ever getting some DVR software working on one box and have in general had to spend a lot of time tweaking the boxes to keep running.
With Linux I have installed Fedora Core 4, 8 times, each installed work for about 2 weeks to 2 month before getting Segfaults while running, then become unable to reboot. I was unable to even read my data back off of the driver. Fortunately I had made tar files backed up on my FreeBSD boxes.
I have also installed Ubuntu twice, both installed systems were a big hassle to get the C compiler and dev environment working.
Even those aren't running very well, crashing every few days.
The thing that really get me though was I have been trying to get a 2.4.X distro working. I have tried Debian, Gentoo and Slackware to no avail.
Two weeks of manually partitioning and having CD only distro's insists on access to the net, while not detecting the network card on My 3 year old Via EPIA M10K motherboard. I really am pulling my hair out.
I have tried everything and just can't get a dam distro to just install and run correctly.
I really need to work on a driver, and a very simple one at that. If only I can just get past the dam basic install!!!
In my team I have Debian members, and a current maintainer in the Linux kernel who also didn't' fair a whole lot better at getting and only distro installed, but at least one had a working system he found from 3 years ago that was already good to go.
So it's not just me, but I find it far more frustrating and infuriating spending weeks to get a dam OS installed.
Such has been my adventure with Linux.
Sunday, February 13, 2005
Eris the Greek goddess
Eris is the Greek goddess of discord, whose golden apple was marked, "to the fairest" (Kallisti). The squabble over this apple created the jealousy that led to the Trojan War. We have adopted that name to describe a group of free thinkers who meet once a year to discuss the arts and sciences, philosophy and theology and any other subject which may lead us to the world of ideas beyond our workaday lives.
New logo for site
13:35:06) YahonatanWalther: lol!
(13:35:16) YahonatanWalther: I love it, you have an image of Eris on at the top of the page. that is so appropriate
(13:35:31) YahonatanWalther: A BSD religion is gauranteed to Discordian/Erisian type of religion. :)
(13:35:33) sokolvideo: I was going to toss in a budda also.
(13:35:42) YahonatanWalther: nah. stick with Eris.
(13:35:49) YahonatanWalther: Eris is the Khaos Mother
(13:36:58) sokolvideo: don't know that much about it, it more a certain astetics I was shooting for.
(13:37:12) sokolvideo: search for purity, elegance and truth in source code.
(13:37:56) YahonatanWalther: yeah, and by accident you stumbled on the image of Eris. it is SOOO appropriate.
Friday, October 01, 2004
Welcome to the Church of BSD blog.
Here are some of my Unix related things.
http://www.unixprogram.com/churchofbsd/
http://www.dnull.com/bsd/ History of 386 BSD documents, new posts and talks
Subscribe to:
Posts (Atom)


