Monday, July 25, 2011

Fwd: Tech Focus: Hardware languages for softies

I'd bet most software people realize that we are almost a the point of pure code to hardware design.

---------- Forwarded message ----------
From: "Embedded.com Newsletter" <Embedded@newsletters.eetimes.com>
Date: Jul 25, 2011 9:08 AM
Subject: Tech Focus: Hardware languages for softies
To: <sokol@videotechnology.com>

»Click here to view online I »Forward to a friend I »Sign up for an EE Times Newsletter

Share this Newsletter:

facebooklinkedintwitterdigg

July 25, 2011

Tech Focus: Hardware languages for softies

HIGHLIGHTS

A guide to VHDL for embedded software developers: Part 1 – Essential commands

Using SystemC to build a system-on-chip platform

The four Rs of efficient system design

Compiling software to gates


Editor's Note

Bernard Cole Bernard Cole
Site Editor
Embedded.com
bccole@acm.org
Read his blog

Every once in a while I find myself caught in the crossfire of debates between embedded systems developers about the pros and cons of C versus C++, C/C++ versus Java, or model-driven versus model-based software design frameworks. At those times I try to remember the advice of Embedded.com columnists Jack Ganssle and Michael Barr: there are no good languages or bad ones, just imperfect languages that may be more or less suitable to the task at hand.

One area where such advice should also be heeded is where the dichotomy is the widest. That is the one between developers using languages such as C or C++ to write software programs to run on microprocessors and those who use hardware design languages to build the actual gates and logic for the CPU, ASIC or FPGA hardware.

This is ironic because, in an effort to make hardware design easier for both hardware and software designers, the industry has borrowed heavily from software languages. The original VHDL for ASICs and FPGAs borrows heavily from Ada, Verilog is based on C, SystemC borrows heavily from C++, and Handel-C uses a rich subset of C. There is even a hardware language based on Java, called Lava, and another called MyHDL which used the Python Web programming language to generate either Verilog or VHDL descriptions.

So when you get right down to it even the hardware is software and developers in both worlds face the same sets of challenges: writing the code, compiling, debugging, simulating and verifying it. And, now, there are frameworks such as ESL, which abstract the design process to the system level.

In this issue of the Tech Focus newsletter is a selection of articles written over the past few years to help reluctant software developers make the transition. Of these, my Editor's Top Picks are:

A guide to VHDL for software developers
Design languages for embedded systems
Transitioning from C/C++ to SystemC

With the emergence of such things as FPGAs with integrated CPU cores and processors with FPGA blocks, the boundary between hardware and software will become even more indistinct. This makes it more important than ever to have the skills to move back and forth as easily as possible.


Design How-Tos

A guide to VHDL for embedded software developers: Part 1 – Essential commands

A series of three articles for embedded software developers unfamiliar with VHDL that is designed to give concise and useful summary information on important language constructs and usage - helpful and easy to use, but not necessarily complete. Part 1: Essential commands.

Using SystemC to build a system-on-chip platform

How Texas Instruments' designers used the SystemC hardware design language to do performance modeling when creating both the company's OMAP-2 platform and the devices based on it.

Transitioning from C/C++ to SystemC in high-level design

It's far easier to do architecture design in SystemC than it is to do it in C and C++. If co-designing hardware and software using high-level design methods, much of your work will be done in an architecture design phase in SystemC. Here's why.

Design Languages for Embedded Systems

Synopsys' Stephen A. Edwards provides a short tutorial on the basics of some of the most important languages, along with examples of each, that will help you decide which one to investigate for your particular embedded application.

Accelerating algorithms in hardware

When you're trying to get the best performance out of your algorithm and you're out of software tricks, try acceleration through hardware/software repartitioning. FPGAs provide everything you need to speed up your algorithms. Lara Simsic shows you how.

Compiling software to gates

Are VHDL and Verilog past their prime, soon to be replaced by C-like design languages such as System C, Handel-C, and others? Professor Ian Page thinks a change is at hand.

The four Rs of efficient system design

New design languages and new chips and systems mean a whole new set of design gotchas for today's developers. Once-simple tasks become difficult and, thankfully, once-difficult tasks become easy. This article for senior designers looks at newer high-level design techniques and how they can improve logic and system design.

Taking System Design to a Higher Level

Keys to raising the design level are the availability of different design methodologies coupled with design tools that can navigate designs at abstraction levels above RTL.

FPGA programming step by step

FPGAs and microprocessors are more similar than you may think. Here's a primer on how to program an FPGA and some reasons why you'd want to.

The art of FPGA construction

Working with FPGAs isn't intimidating when you know the basic techniques and options.

Hardware Design Requires Hardware Design Languages

While languages such as C++ can help in the creation of high-level models of hardware, Sean Dart argues that hardware engineers need specific language constructs in languages such as SystemC that allow them to express their intent in the most accurate and productive manner.

Accellera VHDL Standard

The article describes the salient features of the Accellera VHDL STandard 1076-2006-D3.0

An overview of SystemVerilog 3.1

SystemVerilog 3.1 adds a number of features to the Verilog-2001 standard that facilitate modeling and verification of large systems. In this tutorial, consultant Stu Sutherland provides an overview of some of the more significant new features, and argues that SystemVerilog is ready for adoption and use.

Address system-level HW/SW design tasks with Electronic System Level tools

To keep track of design size and complexity, designers are now looking for the next breakthrough in design productivity, implementation and verification. One answer may be electronic system level design.


Embedded Systems Bookshelf

Excerpts

Embedded Books Reading Room
Bernard Cole's favorite links to book excerpts.

Reviews

Engineer's Bookshelf
Airport fiction blows. A look at books other engineers are reading and why you should read them, too. Recommend and write a review yourself. E-mail Brian Fuller.

Jack Ganssle's Bookshelf
A list of book reviews by Jack Ganssle, contributing technical editor of Embedded Systems Design and Embedded.com.

Max's Cool Beans
Clive "Max" Maxfield, the editor on Programmable Logic DesignLine, often writes about interesting books.


Products

Mentor extends embedded design into ESL

Common Embedded Software Development Platform integrates electronic system level (ESL) capabilities into CodeSourcery tools to support development from virtual prototypes to hardware emulation and boards.

New ESL platform claimed to cut design times in half

Agilent Technologies' new electronic system-level (ESL) EDA platform is said to help algorithm developers and system architects cut design time in half.

CoFluent bridges gap from UML to SystemC

French ESL company CoFluent Design (Nantes, France) claimed it has developed a methodology that combines the OMG's (Object Management Group) standards UML (Unified Modeling Language), SysML (System Modeling Language) and MARTE (Modeling and Analysis for Real-Time and Embedded Systems) profiles.

SystemC synthesis tool adds improved C++ support

Celoxica Holdings said it has enhanced C++ coding support in its Agility Compiler high-level design tool, raising the level of design abstraction above SystemC for designers who need to boost productivity and for programmers less familiar with hardware design.

C/C++ to VHDL for $995

Will C/C++ become a standard for modelling hardware and software systems?

HDL Designer Series Supports SystemVerilog

Mentor Graphics Corporation announced that its HDL Designer Series product has been extended to provide a platform for implementing SystemVerilog.


Search over 4.5 million parts online with Avnet Express!

AvnetExpress.com and its Design Resource Center help customers find and purchase electronic components and development tools with just a few clicks of the mouse. Our extensive online catalogue includes over 1 million parts available in quantities of 1 and same day shipping.
Visit AvnetExpress.com now!


Commentary

Verilog versus VHDL (which is best?)

A reader who knows a little Verilog and a little VHDL is trying to plot his future course; which language should he learn in detail?

Three cool beginners' books on VHDL

While responding to a question from a student, I discovered the answer in our very own Programmable Logic DesignLine forums.

The ESL dilemma

When ESL first started to emerge I knew it would apply here as well, but was unsure about the outcome. Would Mentor, Synopsys, and Cadence fall into insignificance?

Does ESL need another language?

Systems architects need to describe the requirements and architecture of a system without the limits imposed by a presumed implementation choice. Some of the projects aiming to develop a true architectural language for the ESL market show both technical and financial promises.

Is EDA stuck between a rock & a soft place?

The dilemma facing IC designers & suppliers of EDA hardware tools as they struggle to meet the software demands of new designs can best be described as being caught "between a rock and a soft (ware) place."

Is low power driving move to integrated HW/SW codesign?

While many pressures are driving embedded developers to higher level tools to integrate hardware/software design, debug and verification, is the most potent factor the need for lower power designs that do not sacrifice performance?


Sponsored White Papers

VHDL Coding Style to Infer LatticeECP2 sysDSP Blocks with Precision

Off to the Races with Your Accelerated SystemVerilog Testbench

Introduction to Verilog

Overview of Digital Design with Verilog HDL

Digital System Design Automation with Verilog

Using System Generator for Systematic HDL Design, Verification, and Validation


Courses and Webinars

Harness the Power of SystemVerilog with Design Compiler to Increase Productivity

ESC SV-282- A Methodology for Successful VHDL-Based FPGA Design

Fundamentals of ESL Synthesis

ESC SV-283- Making System-Level Hardware and Software Tradeoffs

Conquer FPGA Design Complexity with System-Level Integration


Resources

Around the Network Events

VHDL design projects (VIDEOS!!)

Verilog design projects (VIDEOS!!)

ESC Silicon Valley 2011: THE VIDEO!!

Embedded.com Newsletters (BACK ISSUES)


DRIVEFORINNOVATION
DESTINATION: AVNET EXPRESS
The ultimate electronics road trip has begun! Join the adventure at driveforinnovation.com
where you can follow content from the road trip, access a drive tracker and an interactive
map highlighting the tour as well as participate in games, prizes and weekly contests! For a
chance at winning this week's prize go to: http://www.driveforinnovation.com/contest-3-now-open


Conferences and Events

ESC Boston 2011
Conference: September 26-29
Expo: September 27 & 28

Register now for the All Access Pass and receive a BeagleBoard-xM and eZ430 Chronos watch, as well as exclusive access to: DesignCon East, DesignMED and Designing with LEDs!  Expo Pass registration is FREE.

Check out what's new with ESC Boston:

Don't miss your opportunity to attend the hottest embedded event of the Fall.

Register Now!

* Available to the first 40 people who register for the All Access Pass only. Must attend to receive.


News & Analysis

The evolution of design methodology

In nature, long periods of relatively stable environments are occasionally punctuated by large-scale changes that are the catalyst for evolution to create a large variety of mutations, and then for natural selection to weed out the unsuccessful ones. The environment in which design methodology lives is similar.

Evolution of design methodology II: The re-aggregation era

Part two of the two-part essay co-authored by Paul McLellan and Jim Hogan about evolving design methodology and how it will change the industry.

The ESL battle for hearts and minds

Things have turned deadly serious this week between two major players in the ESL market, Mentor Graphics and Forte Design Systems.

ARM, Xilinx to collaborate on programmable systems

FPGA vendor Xilinx Inc. (San Jose, Calif.) and ARM Holdings plc (Cambridge, England) have announced they are collaborating to enable ARM processor and interconnect technology to be implemented within Xilinx FPGAs.

Altera, MIPS roll FPGA-optimized soft processor

Altera, MIPS Technologies and System Level Solutions introduced a MIPS-based FPGA optimized soft processor for use on Altera's FPGAs and ASICs to create solutions for networking, video and digital signal processing applications.

ARM, Actel combine forces on soft 'Thumb' for FPGA

U.S. FPGA vendor Actel Corp. has struck a deal with processor IP licensor ARM Holdings plc whereby Actel customers are to set to be able to implement a soft ARM7 Thumb microprocessor on a range of ARM technology-enabled FPGAs due to come out some time in 2005.

Cypress plans bigger, faster, cheaper PSoC chips

Lifting the covers a bit on Cypress Microsystems' road map for its unique PSoC family of programmable embedded devices, director of strategic marketing Nathan John recently announced that the company will release three new subfamilies of PSoC parts by the end of this year, all extensions of the current PSoC architecture.


This email was sent to: sokol@videotechnology.com

To subscribe to UBM Electronics emails or change your email preferences please click here.

Go to EETimes.com
A UBM Electronics Newsletter © 2011. All rights reserved.
Privacy Policy I Advertising Information I Unsubscribe
UBM Electronics, 303 Second Street, Suite 900 South, San Francisco, CA 94107

Lightweight Portable Security Is a Portable Linux Distro from the Department of Defense - Lifehacker

http://m.lifehacker.com/5824183/lightweight-portable-security-is-a-portable-linux-distro-from-the-department-of-defense

'The Code Has Already Been Written' - Slashdot

http://developers.slashdot.org/story/11/07/24/1941242/The-Code-Has-Already-Been-Written

Thursday, July 21, 2011

Oracle Acquires K-splice

Ksplice has an amazing ability to apply kernel updates without rebooting.

From Wikipedia
Ksplice was an open source extension of the Linux kernel which allows system administrators to apply security patches to a running kernel without having to reboot the operating system. Ksplice has been implemented for Linux on the x86-32 and x86-64 architectures. It is currently being developed by Ksplice, Inc.

From Slashdot : Oracle Acquires K-splice For an Undisclosed Amount
"Oracle today announced it's completed the acquisition of K-Splice, dropping support for Redhat, CentOS, and SUSE, and closing doors to new customers. Unless of course you want to become a Oracle Linux Premier Support subscriber — then it comes as standard."

Oracle acquired Sun Microsystem and the Solaris Operating System an AT&T and BSD Unix blend.
They also have there own Oracle Linux, formerly known as Oracle Enterprise Linux. That is supposed to be Unbreakable and known as the "Unbreakable Enterprise Kernel"

Save a Dying Video Card with a Quick Bake in the Oven - Lifehacker

http://m.lifehacker.com/5823227/save-dying-video-cards-with-a-quick-bake-in-the-oven

Using a router as a linux based PID controller

http://hackaday.com/2011/07/21/using-a-router-as-a-linux-based-pid-controller

Monday, July 18, 2011

OSCON, Open Source Convention.

http://www.oscon.com/oscon2011


July 25-29, 2011at the Oregon Convention Center in Portland, Oregon.

$25 for Exhibits

$695 to $2190 depending on the type of pass you get.

TCP/IP over Bluetooth

---------- Forwarded message ----------
From: John Sokol <john.sokol@gmail.com>
Date: Tue, Sep 25, 2007 at 11:51 AM
Subject: Re: TCP/IP over Bluetooth
To: David


BNEP (Bluetooth Network Encapsulation Protocol)

http://www.comms.scitech.susx.ac.uk/fft/bluetooth/BNEP_0_95a.pdf

http://en.wikipedia.org/wiki/Bluetooth_stack

Linux How to on PXA255 GumStix
http://docwiki.gumstix.org/Networking

Seems to be some limited Windows support. Seems more for Pocket PC's and WinCE.
Not clear for 2000 and XP

Google - AF_BTH &  SOCKADDR_BTH


On 9/25/07, David
>
> http://www.linuxjournal.com/article/7525
>
>    BlueZ supports the different user profiles described
>    by the Bluetooth specification. BlueZ BNEP (Bluetooth
>    Network Encapsulation Protocol) implements Ethernet emulation,
>    which lets TCP/IP run directly over Bluetooth.

Researchers Debut Proxy-Less Anonymity Service

From Slashdot : Researchers Debut Proxy-Less Anonymity Service

"As state-level censorship continues to grow in various countries around the globe in response to political dissent and social change, researchers have begun looking for news ways to help Web users get around these restrictions. Now, a group of university researchers has developed an experimental system called Telex that replaces the typical proxy architecture with a scheme that hides the fact that the users are even trying to communicate at all."

Thursday, July 14, 2011

The Best Unknown Open Source Projects

From Slashdot : The Best Unknown Open Source Projects

"Carla Schroder points to an interesting trend in open source: 'The growth of large distributed projects.' OpenTox, which uses computer modeling instead of animal testing for chemical toxicity testing, and AMEE (Avoiding Mass Extinctions Engine), which uses open source software and methodologies to collect, map, measure and analyze carbon dioxide data, are two such projects. 'FOSS presents a natural platform for building large distributed projects because of the low barrier to entry — open code, open standards, and freely-available robust, high-quality high-performance software,' says Schroder." What open source project gets less attention than you think it deserves?

Fwd: OSNews Brief

---------- Forwarded message ----------
From: "OSNews Newsletter" <news@news.nl00.net>
Date: Jul 14, 2011 5:00 AM
Subject: OSNews Brief
To: <john.sokol@gmail.com>

Latest News Jul 14, 2011

Why Microsoft's 'Cloud Bribes' Are the Right Idea

"InfoWorld's Woody Leonhard uncovered the fact that Microsoft is paying some organizations to adopt its Office 365 cloud service, mostly in funds that Microsoft earmarks for their customers' migration costs and other required consulting. Although this raised the eyebrows of some bloggers - and I'm sure Google wasn't thrilled - I think this is both smart and ethical. Here's ...

Read more...    Twitter    Facebook    Linkedin   

SSH Client PuTTY 0.61 Released

"After four long years, here comes a new version of PuTTY, the popular free telnet/SSH client for Windows and Unix platforms. PuTTY 0.61 brings new features, bug fixes, and compatibility updates for Windows 7 and various SSH server software. The new version supports SSH-2 authentication using GSSAPI, on both Windows and Unix. Users in a Kerberos realm should now be able to use their existing Kerberos single sign-on in their PuTTY SSH ...

Read more...    Twitter    Facebook    Linkedin   

* Of Course a Tablet Is a PC - The iPad Is a PC Too, You Know *

With Windows Phone 7 being a success among critics and probably the only mobile platform which tries to take at least baby steps away from the old WIMP/desktop paradigm, it's not entirely unsurprising that a lot of people are asking for Windows Phone 7 on tablets. However, Microsoft once again reiterated that WP7 is not meant for tablets, since they view tablets as PCs - hence, they will be running regular Windows. Read more on this exclusive OSNews ...

Read more...    Twitter    Facebook    Linkedin   

Featured Free Resource

PC Maintenance Handbook - 2nd Edition

Improve your PC's performance, speed, and reliability.

Rapid DHCP: Or, How Do Macs Get on the Network so Fast?

"One of life's minor annoyances is having to wait on my devices to connect to the network after I wake them from sleep. All too often, I'll open the lid on my EeePC netbook, enter a web address, and get the dreaded 'This webpage is not available' message because the machine is still working on connecting to my Wi-Fi network. On some occasions, I have to twiddle my thumbs for as long as 10-15 seconds before the network is ready to be used. The frustrating thing is that I know it doesn't have to be this way. I know this because I have a Mac. When I open the lid of my MacBook Pro, it connects to the network nearly instantaneously. In fact, no matter how fast I am, the network comes up before I can even try to load a web page. My curiosity got the better of me, and I set out to investigate how Macs are able to connect to the network so quickly, and how the network connect time in other operating systems could be improved." Yes, I'd love to have Windows and Linux reconnect as fast as Macs do. Alas, "Method to quickly reconnect to a wireless or wired network", as well as its completely different "Method to quickly reconnect to a wireless or wired network on a mobile device" are probably patented, so Windows and Linux can't reconnect too fast out of fear of violating a software patent. In case you haven't noticed: I'm joking. Sort ...

Read more...    Twitter    Facebook    Linkedin   

GNU Hurd Quarterly Status Teport

The Hurd is still doing its thing. "Jeremie Koenig started working on his Google Summer of Code project: bringing not only Java to the Hurd, but also fixing or adding missing parts in the Hurd's components along the way. For example, he already contributed a set of signal handling improvements. Samuel Thibault created the first Debian GNU/Hurd CD set with a graphical installer. You can dowload it at the usual place for Debian CD ...

Read more...    Twitter    Facebook    Linkedin   

HTC Disappointed Apple Chooses Litigation over Fair Competition

Tell 'm like it is, HTC. "HTC is disappointed at Apple's constant attempts at litigations instead of competing fairly in the market," said HTC general counsel Grace Lei in a statement, "HTC strongly denies all infringement claims raised by Apple in the past and present and reiterates our determination and commitment to protect our intellectual property ...

Read more...    Twitter    Facebook    Linkedin   

Featured Free Resource

PC Maintenance Handbook - 2nd Edition

Improve your PC's performance, speed, and reliability.

Pandora Drops Flash for HTML 5
"Internet streaming music service Pandora announced on Tuesday that it is phasing out Flash in favor of HTML 5. The change means users won't have to rely on the Flash plug-in in their Web browser to listen to the service's music offerings, and the company claims switching to HTML 5 has improved overall performance, too. 'The front-end technology has been rebuilt in HTML 5 and together with a host of other improvements results in a much faster experience,' the Pandora Web site ...
Read more...    Twitter    Facebook    Linkedin   

Critical Vulnerability in Sun Java
ACROS Security has discovered a vulnerability in Sun Java, which can be exploited by malicious people to compromise a user's system. The vulnerability is caused due to the application loading an executable file in an insecure manner when an out of memory condition ...
Read more...    Twitter    Facebook    Linkedin   

Android is the Linux Desktop Dream Come True
In an interview with the Austrian tech site derStandard.at/web Google's Chris DiBona talks about the important role Open Source plays inside of Google. He also goes on to explain why "Android is the Linux desktop dream come ...
Read more...    Twitter    Facebook    Linkedin   

You are receiving this newsletter because you opted-in to receive relevant communications from OSNews.com. If you would like to manage your newsletter preferences or if you no longer wish to receive this newsletter, please click here.

OSNews.com, 2505 Bear Hollow Dr. Park City, UT 84098
Contact: osnews@osnews.com

Wednesday, July 13, 2011

Comcast Bans Seattle Man From Internet for His Cloudy Ways | Epicenter | Wired.com

http://m.wired.com/epicenter/2011/07/seattle-comcast/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+wired%2Findex+%28Wired%3A+Index+3+%28Top+Stories+2%29%29&utm_content=Google+Feedfetcher

In search of the NetBSD meeting

There are a number of clubs that meet in the Bay Area related to different branches of BSD unix and Linux.

http://linuxmafia.com/bale/
and
http://www.svbug.com/babe/  which is hopelessly out of date.


http://www.imrryr.org/  The Unofficial NetBSD web site.
http://www.imrryr.org/NetBSD/
http://www.netbsd.org/ Official NetBSD web site. 


I was hoping to find the:
San Francisco Bay Area NetBSD User Group

So yesterday evening I went to Vince's pizza at 7:30 and no one showed up, then went to the last known meeting location, which was a Pizza Hut on Saratoga and Moorpark that no longer exists.

So the NetBSD meeting is lost.   No amount of googling seems to be able to find them.

Any ideas?

R.M. the Bale maintainer said:
No.  They have had a habit of moving and not telling people in any
reasonable fashion where they've gone.  It's taken some considerable
detective work finding out that they still existed, the last couple of
times they moved.  I'm afraid the most sensible assumption is going to
be that they've ceased to exist unless inquiries on NetBSD mailing lists turn up credible information to the contrary.
 

Tuesday, July 12, 2011

The Pilgrimage


I had this crazy idea, that I could actually make the Church of BSD, a real church.  One dedicated to preaching the values and virtues of BSD UNIX and Linux.  Open Source, and cooperation in development of technology.



What sacred OS place do you worship at?
http://www.geekculture.com/joyoftech/joyarchives/635bpoll.html

Mini user space TCP/IP stacks.

Again more raw dump from my old notes. Sorry it's not been cleaned up in to a nice article.



uIP   http://www.sics.se/~adam/uip/index.php/Main_Page

lwIP  http://savannah.nongnu.org/projects/lwip/

Alpine - user space TCP/IP  (Gone from the net)
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. 

Daytona ""   http://nms.lcs.mit.edu/~kandula/data/daytona.pdf

Open TCP  http://www.opentcp.org   Site is now dead!!!
OpenTCP-1.0.1.src.zip
OpenTCP-1.0.2.src.zip
OpenTCp-1.0.3.src.zip  All are missing from net.

http://sourceforge.net/projects/opentcp/  current  1.0.2 is available there.    7/2008
http://www.violasystems.com/   has commercial supported version of OpenTCP..


tinytcp  http://www.unusualresearch.com/tinytcp/tinytcp.htm

up/IP  http://ucip.sourceforce.net

uIP    http://www.sics.se/~adam/uip

Fwd: From TechWeb: Whitepapers and One Hour Webcasts on cloud

---------- Forwarded message ----------
From: "Business Technology Alert" <Business_Technology_Alert@businesstechalertinfo.net>
Date: Jul 12, 2011 8:40 AM
Subject: From TechWeb: Whitepapers and One Hour Webcasts
To: "John Sokol" <sokol@dnull.com>


July 12, 2011

TechWeb Live - Attend a live event, take a survey, and visit some of our one hour Complimentary WebCasts and get your questions answered! Click on the title of the event to Register.

6 Advantages of a Cloud-Based Help Desk for Small to Midsize Businesses

Small and midsize companies shouldn't have to use less efficient, limited-functionality service desk solutions. Today's cloud-based help desks pack the same punch as on-premise enterprise solutions, without a large up-front investment or long installation time. Read more to find out how to get started with a cloud-based help desk today.


Cutting Costs and Streamlining IT with Virtualization -- Join us for this don't-miss Webcast for Federal Agencies!

Date: Wednesday, July 13, 2011
Time: 10:00 am PT / 1:00 pm ET
Duration: 60 minutes


Federal government IT departments are under increasing pressure to reduce costs and achieve operational efficiency as outlined in the OMB 25 point plan. One of the most widely adopted and effective approaches is the use of server virtualization, but many virtualization implementations falll short of the technology's true potential. While some federal departments see hardware savings, others realize much more – a 33% savings in IT operations costs or 200% faster service delivery.

Attend our complimentary webinar and learn how you can maximize the full potential of virtualization by optimizing infrastructure, software, and processes.


Solving the Right Problems: The New Approach to Efficient Data Centers, Part II

Date: Thursday, July 14, 2011
Time: 12 PM PST/ 3 PM EST
Duration: 60 minutes


Traditional data centers are built around waste. The old one-server-per-app model created silos of underused resources that were expensive to maintain. In a cost-conscious and fast-paced business climate, data centers have to do more and cost less.

That seemingly paradoxical goal is entirely achievable, as long as the data center is re-envisioned as a simpler, better, faster resource for the business. Join us for an in-depth, 60-minute look at how Dell's Advanced Infrastructure Manager (AIM) helps enterprises drive down costs for and speed up key IT challenges.

You'll learn how to:

Cut down on waste. An intelligent infrastructure makes it easier to identify wasted resources and redirect or retire them.

Reduce the risk and time involved in test-dev cycles. Test patches, updates and migrating to new applications is a process fraught with risk, but the ability to easily pull a workload back and restore the previous version speeds the process and removes the worry

Establish and test disaster recovery plans that actually work. Few companies test their DR plans, because testing traditionally required that systems be offline; AIM enables testing through a simulation, so it can be occur even during working hours. Register today to secure your place is this discussion of key data center challenges.


Architecting your storage infrastructure to help enable the private cloud

Date: Thursday, July 14, 2011
Time: 11:00 am PT / 2:00 pm ET
Duration: 60 minutes


CIOs have spoken. Cloud computing is one of the top initiatives for 2011. The promise of cloud computing is to deliver new capabilities at less cost. You are probably being asked questions like "What is our private cloud strategy?" by your management and users. What is your response?

Dell has been working with our customers and partners to deliver infrastructure to enable the private cloud. A central element of that infrastructure is a virtualized shared storage infrastructure that abstracts storage objects from the underlying storage hardware.

Please join us for an informational webinar during which we'll explore questions such as:

What is private cloud computing?

What are the specific technologies needed to support the private cloud?

How can I evolve my current infrastructure toward a private cloud model?

How does virtualized shared storage enable private cloud computing?


Smarter Computing: Server Innovation for Midsize Businesses

Date: Wednesday, July 20, 2011
Time: 11 AM PST/2 PM EST
Duration: 60 minutes


Despite the tough economic climate, midsize businesses are fueling innovation and growth. With a strategic mindset focused on customer service and revenue growth, these companies are leveraging new hardware and infrastructure technologies to help them drive up productivity and become more competitive. Join IBM and InformationWeek for a one-hour webcast discussion on the priorities and challenges of midsize businesses and how new server technologies can improve performance and reduce administration expenses.

You will learn:

  • How to improve efficiency and quickly gain a return on investment
  • How to ease deployment and management of your server infrastructure
  • Why there's a cost-benefit for refreshing your servers now
  • How to improve virtualization efficiency
  • How key vendors stack up in terms of delivery, reliability, support, and overall customer satisfaction.

Eight Critical Steps ISVs Should Take to Secure their SaaS Applications in the Cloud

Date: Wednesday July 20, 2011
Time: 10:00 AM PT / 1:00 PM ET
Duration: 60 minutes


Cloud-based Software-as-a-Service (SaaS) solutions have gained acceptance among organizations of all sizes. While SaaS providers carefully weigh the considerable cost and management benefits of moving to cloud computing, the critical topic of complying with IT security requirements becomes a significant issue.

In a cloud-based environment, the traditional rules of security design and development are dramatically altered – and new planning and development methodologies, and validation tests must be applied.

Register today and learn:

  • How to determine the best type of cloud for your software security needs
  • How to select a suitable cloud hosting and service provider
  • How to determine what to host in the cloud and how to segment data for physical, virtual and cloud accessibility
  • Best practices for implementing a layered security model to meet compliance requirements

Cloud Computing in the Midmarket: Assessing the Options

Cloud solution options include public, private and hybrid models each of which offers its own benefits, cost model and risks. Read this analyst brief from IDC to learn about each of these models and discover how your organization can take advantage of them.




_______________________________________________________
You are on the Business Technology Alert Email List.
To take your email address off of this list for future messages from
third party advertisers, as well as notify this advertiser that you no
longer wish to receive messages from them, please follow this link:
http://businesstechalertinfo.net/o/?ZXD=62.139457674.680548.
Business Technology Alert is not responsible for the products or
services presented in this message.
TechWeb, a division of United Business Media LLC, 600 Community Drive,
Manhasset, NY, 11030
Privacy Policy: http://www.ubm.com/ubm/sitetools/privacy/

OpenStack gets a startup seeking to commercialize the code | Cloud Computing News

http://gigaom.com/cloud/openstack-gets-a-startup-seeking-to-commercialize-the-code/

Friday, July 08, 2011

Re: DHS Admits Knowledge of Infected Import Tech

Label your article, "The Other Big Brother".
Starts like this,

$preface = "
Worried about Obame and his cronies, or Cheney's lackies still in
government. Here is a bigger concern. All our computers and factories
are now overseas. Literally the Chinese make everything for us. Now we
come to find out that they may be the "Big Brother" have all feared
for years - That is ever since "1984".
";

Jesse


On 7/8/11, John Sokol <john.sokol@gmail.com> wrote:
> This is frightening.
>
> http://it.slashdot.org/story/11/07/08/208206/DHS-Admits-Knowledge-of-Infected-Import-Tech
>
> *"Deputy Undersecretary Schaffer of the DHS National Protection and Programs
> Directorate confessed to being aware of foreign technology that had been
> imported with spyware, malware, and other security risks. According to the
> article, 'More worryingly, the hearing specifically mentioned hardware
> components as possibly being
> compromised<http://www.fastcompany.com/1765855/dhs-someones-spiking-our-imported-tech-with-attack-tools>—
> which raises the questions of whether, perhaps, something as innocuous
> as
> Flash memory or embedded RFID chips could be used by interested foreign
> parties.' These hearings were held on July
> 7th<http://oversight.house.gov/index.php?option=com_content&view=article&id=1363%3A7-7-11-qcybersecurity-assessing-the-nations-ability-to-address-the-growing-cyber-threatq&catid=12&Itemid=20>to
> 'examine the nature and extent of the current threat to America's
> infrastructure.'"*
>

Re: DHS Admits Knowledge of Infected Import Tech

Dude i told you the exact same thing over 9 months ago
i told what i was told

On Fri, Jul 8, 2011 at 2:18 PM, John Sokol <john.sokol@gmail.com> wrote:
> This is frightening.
>
> http://it.slashdot.org/story/11/07/08/208206/DHS-Admits-Knowledge-of-Infected-Import-Tech
>
> "Deputy Undersecretary Schaffer of the DHS National Protection and Programs
> Directorate confessed to being aware of foreign technology that had been
> imported with spyware, malware, and other security risks. According to the
> article, 'More worryingly, the hearing specifically mentioned hardware
> components as possibly being compromised — which raises the questions of
> whether, perhaps, something as innocuous as Flash memory or embedded RFID
> chips could be used by interested foreign parties.' These hearings were held
> on July 7th to 'examine the nature and extent of the current threat to
> America's infrastructure.'"
>

--

The illiterate of the future will not be
the person who cannot read. It will be the person
who does not know how to learn to embrace change
and become a facilitator to adapt to change   .
Alvin Toffler

NDA or Pre- NDA Work Product: ANY conveyance to any third party of the
ideas, concepts, and/or market relationships newly described herein,
signifies a contract breech at the expense Leveious Rolando,
recognizes without dispute  the intellectual property of recipient and
agrees not
to disclose any proprietary visual Intellectual properties related to
Leveious Rolando obvious: This is  for our eyes and ears only

DHS Admits Knowledge of Infected Import Tech

This is frightening.

http://it.slashdot.org/story/11/07/08/208206/DHS-Admits-Knowledge-of-Infected-Import-Tech

"Deputy Undersecretary Schaffer of the DHS National Protection and Programs Directorate confessed to being aware of foreign technology that had been imported with spyware, malware, and other security risks. According to the article, 'More worryingly, the hearing specifically mentioned hardware components as possibly being compromised — which raises the questions of whether, perhaps, something as innocuous as Flash memory or embedded RFID chips could be used by interested foreign parties.' These hearings were held on July 7th to 'examine the nature and extent of the current threat to America's infrastructure.'"

Thursday, July 07, 2011

More on User Space TCP/IP Stacks.

I found another Stack:



Prashant Pradhan, Srikanth Kandula, Wen Xu, Anees Shaikh, Erich Nahum
This paper presents Daytona, a user-level TCP stack for Linux. A user-level TCP stack can be an invaluable tool for TCP performance research, network performance diagnosis, rapid prototyping and testing of new opti- mizations and enhancements to the TCP protocol, and as a tool for creating adaptive application-level overlays. We present the design and implementationof Daytona, and also describe several projects that are using Daytona in a rich variety of contexts, indicating its suitability as an open-source project.
Published in 2002.
http://nms.csail.mit.edu/~kandula/data/daytona.pdf

And Another Stack:

Minet: A User-level TCP/IP Stack
http://www.cs.northwestern.edu/~pdinda/minet/



Another useful part to get such a system running.

libpcap is a system-independent interface for user-level packet
capture. libpcap provides a portable framework for low-level network
monitoring. Applications include network statistics collection,
security monitoring, network debugging, etc.


I was able to do this using the Raw Socket interface in promiscuous mode to make a new MAC and IP that was pingable, I should dig out that code and post it.

There is also the Tap and Tun devices available too.

Alpine user space TCP/IP missing from the Net.

ALPINE:  Application-L evel Protocol Infrastructure for Network Experimentation  

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. 


In a reply to: My notes on TCP/IP stacks.
chakster said...
Any suggestions on where I can lay my hands on the ALPINE src code and their documentation. The project is conspicuously missing on the web.

As far as I can tell Alpine and Alpine4Linux were user-space ports of the FreeBSD 4.8 TCP networking stack


The URL's were
http://alpine.cs.washington.edu/
 http://www.vzavenue.net/~neelnatu/alpine4linux/.
Unfortunately, these doesn't exist any more.

I found a paper on it:
http://www.usenix.org/event/usits01/full_papers/ely/alpineUs.pdf


If anyone has the code, please let me know, send me a copy if possible.
Meanwhile if I ever get my dead server I will try to recover my copy off the disks.
I would really love to have this code. 


List:       linux-net
Subject:    Re: Is it possible to run TCP/IP stack in user space?
From:       John Heffner 
Date:       2006-11-09 5:29:14
Subramonia Pillai wrote:
> Hi,
> 
> I have one doubt. Is it possible to run a third party
> TCP/IP stack as application over a native linux
> kernel. Please give some pointer how it will be done?

Maybe, with some difficulty.

I'm aware of a few things that did this over BSD, but they're really out 
of date.  The Alpine project pulled the BSD TCP stack out into a 
userspace library: 
<http://sosp16.cs.washington.edu/homes/djw/papers/Usits01.pdf>.  The 
FoxNet project wrote a full TCP/IP stack from the ground up in SML: 
<http://www.cs.cmu.edu/~fox/foxnet.html>.  IIRC, they both had similar 
hack layers for running on top of a unix kernel, using pcap, firewall 
filters and raw sockets.



Harvested from Archive.org, looks like appeared in 2003 then vanished in 2005.

Alpine4Linux

Neelkanth Natu (neelnatu@yahoo.com)


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 by David Ely, Stefan Savage and David Wetherall. I would like to point out right away that the Alpine4Linux design is completely different from the implementation described in the paper. In particular Alpine4Linux has a single FreeBSD networking stack that is shared by multiple client processes.

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.

Alpine4Linux Server in Action

Here is a output of the Alpine4Linux server when it starts up. The server initializes the kernel when it starts up which is the reason for the FreeBSD copyright messages.

[root@localhost scripts]# bash run_alpine_server.sh

Modifying INPUT and FORWARD chains to drop packets destined to 10.11.12.13

Listening on 127.0.0.1:8475!
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 4.8-RELEASE #4: Fri May 30 02:29:53 PDT 2003
    neel@localhost:/home/neel/av/main/bsd/src/sys/compile/NINT
Opening tap0
Setting hwaddr for tap0 device to: 0:4:76:ec:2a:f0
Setting IP address of tap0 device to: 10.11.12.13


Alpine4Linux uses the "tap0" pseudo-device within the FreeBSD kernel to do raw packet I/O. The "tap0" interface is mapped to a real Linux device (e.g. "eth0") on which the packet I/O really happens. The server also sets the hardware address of the "tap0" pseudo-device to match the hardware address of the real device "eth0". This allows the FreeBSD stack to reply to arp requests for its IP address with a valid hardware address. Note that we change iptables ruleset so that the Linux kernel will ignore packets destined to the Alpine stack.

Alpine4Linux Clients in Action

We can run networking utilities like "ifconfig" and "route" against the Alpine4Linux stack. Note that the "ifconfig" program is the stock Linux program. Also note that we are using a wrapper shell script to execute the programs. The shell script sets up the LD_PRELOAD and LD_LIBRARY_PATH variables before launching the program.

[neel@localhost scripts]$ bash run_alpine_client.sh /sbin/ifconfig tap0
tap0      Link encap:Ethernet  HWaddr 00:04:76:EC:2A:F0
          inet addr:10.11.12.13  Bcast:10.11.12.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1



[neel@localhost scripts]$ bash run_alpine_client.sh ../sbin/route/route -- add 10.11.12.0/24 -interface 10.11.12.13
add net 10.11.12.0: gateway 10.11.12.13
[neel@localhost scripts]$ bash run_alpine_client.sh ../sbin/route/route -- get 10.11.12.1
   route to: 10.11.12.1
destination: 10.11.12.0
       mask: 255.255.255.0
  interface: tap0
      flags:
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500       -12

I have also tested client programs like nmap, telnet and server programs like vsftpd-1.1.3 successfully against Alpine4Linux.

Source Code

You can download the source code here. Untar the tarball using 'tar xvzf alpine4linux.tar.gz' and look for the file docs/running.txt to start playing with Alpine4Linux.

Documentation

Get Alpine4Linux up and running quick: running.txt

A description of how Alpine4Linux pretends to be the FreeBSD kernel: alpine4linux.txt

FAQ: faq.txt

Limitations of Alpine4Linux: limitations.txt

Differences between Alpine4Linux and the original Alpine implementation: differences_from_alpine4bsd.txt

Acknowledgements

David Ely, Stefan Savage, David Wetherall for Alpine
Perforce source control system for their free 2-client license
Shri and Ravi for tolerating me when I am babbling





Introduction:

Alpine4Linux is a userlevel FreeBSD 4.8 networking stack running on top
of a stock Linux kernel. The original idea is attributed to [1]. However
I must point out the Alpine4Linux is *not* a port of the original Alpine
(referred to as Alpine4BSD henceforth). In fact there is not a single line 
of code common to the two implementations.

Alpine4Linux has two components:
1. A daemon (alpine_server), that runs the FreeBSD stack code and does
   network I/O on behalf of processes wishing to use the FreeBSD stack.
2. Shared libraries (libClientSocket.so and libAlpineSupport.so) that
   hijack networking related system calls and divert them to the
   alpine_server. 

Why Alpine4Linux:

I did this project because I was fascinated by the idea of running
kernel components in a userlevel process. But seriously, I don't know why 
anyone would want to run a FreeBSD stack in userspace on a Linux box. 

The authors of the original Alpine4BSD paper cite better debugging 
and faster compile-test cycles when doing network protocol development.
That seems to be as good a reason as any.

Supported versions:

The FreeBSD stack is the 4.8-RELEASE version (downloaded on April 8 2003).

The only Linux dependency that the code has is that it support PF_PACKET
family of sockets and it should support makecontext() and swapcontext(). 
Other than that it should run on any Linux distribution.
uname -a on my Linux box:
Linux localhost 2.4.20-13.8 #1 Mon May 12 12:20:54 EDT 2003 i686 i686 i386 GNU/Linux

How does it work:

The alpine_server is a Linux program that acts like a FreeBSD kernel as
far as the networking stack is concerned. Just like the FreeBSD kernel it
provides client programs with a socket layer. It also does network I/O 
on behalf of client programs. But that is where the similarity ends. 

A kernel presents a system call interface to client programs. The
alpine_server presents a RPC interface. RPC here simply means that 
it listens for requests over the network. 

For e.g. if the client program tries to open a socket(), a message 
will be sent to the alpine_server. The message will indicate the 
type of the request (REQ_SOCKET) and its parameters (AF_INET,SOCK_STREAM).
The response will contain the type of the response (RESP_SOCKET) and
the return value (socket_fd, errno).

Client programs link with 2 shared libraries libClientSocket.so and
libAlpineSupport.so using LD_PRELOAD and LD_LIBRARY_PATH environment
variables. These libraries "intercept" the socket related functions before
they can be processed conventionally by the Linux libc. Instead each
socket related system call (e.g. socket(), bind(), connect()) is transformed
into a message to the alpine_server.

The alpine_server and its clients communicate over a standard TCP socket
bound to 127.0.0.1.

Requirements:

An unmodified networking stack:

The sys/net, sys/netinet and certain files under sys/kern must be from
the stock FreeBSD-4.8 release. This requirement was mostly satisfied.
I had to make 3 changes to work around some differences between Linux 
and FreeBSD. The changes are trivial and do not change functionality. 
See Appendix A for more details on these changes.

Ability to use unmodified Linux binaries:

It should be possible to simply define the LD_PRELOAD and LD_LIBRARY_PATH
variables and run any dynamically linked Linux networking application
against the FreeBSD stack.

E.g. It is possible to configure the FreeBSD stack interfaces using the
stock 'ifconfig' on Linux. I have also run 'telnet', 'nmap' and 'ping' 
against the alpine_server with no problems. Unfortunately it was too
difficult to use the Linux 'route' command against the FreeBSD stack.
Alpine4Linux provides the 'route' program from FreeBSD, ported to Linux,
that can be used to configure routing in the FreeBSD stack.

Reuse as much of the FreeBSD kernel code as possible:

This requirement is subjective but I think Alpine4Linux utilizes
a *lot* of unmodified FreeBSD kernel code. In fact the alpine_server 
defines only two non-trivial functions that are required by the kernel:
mi_switch() and scheduler().

scheduler() runs the main select() loop in the alpine_server.
mi_switch() deals with switching the FreeBSD kernel execution context.
These functions are described in detail later in this document.

Alpine4BSD uses unmodified sysinit, timeouts, tsleep() and wakeup(),
descriptor management for e.g.

Implementation:

Sending and receiving packets:

The alpine_server is invoked with the name of the interface (on the host
OS) that it uses to send/receive packets. The IP address and subnet that
are used by the FreeBSD stack are also specified on the command line.

E.g. ./alpine_server eth0 10.11.12.13 255.255.255.0
This tells the alpine_server to use the "eth0" interface on Linux to
send/receive packets. It also assigns 10.11.12.13/24 as the IP address
of the FreeBSD stack.

The alpine_server first opens a socket of family PF_PACKET. This is the
recommended way to do raw packet I/O on Linux. A BPF program is compiled,
so that only packets destined for the FreeBSD stack are injected into the
stack. The BPF filter expression is "host ".
Lets call this file descriptor the 'linux_pcap_fd'.

Next we open the "tap" pseudo-device in the FreeBSD stack. This device
presents an Ethernet device interface to the FreeBSD stack.
On the other side the "tap" device returns an 'fd' that can be read and
written to inject raw ethernet packets into the FreeBSD stack. Lets call
this file descriptor the 'freebsd_tap_fd'.

The alpine_server now configures this "tap" device by setting its MAC
address to the MAC address of the interface specified on the command line.
It also sets the IP address of the "tap" device to that specified on the
command line.

Now the job of the alpine_server is simply to read a packet from
'linux_pcap_fd'; run the packet through the BPF filter, and write
the packet to 'freebsd_tap_fd'. In the other direction it reads from
'freebsd_tap_fd' and writes to 'linux_pcap_fd'.

Simulating interrupts:

The alpine_server puts the 'linux_pcap_fd' in its select() read fdset. 
Whenever a packet arrives at the interface, select() returns and 
the packet can be read, filtered and injected into the FreeBSD stack. 

Alpine4Linux acts like a true interrupt driven stack because we
inject packets into the FreeBSD stack as and when we get them.

Software interrupts:

The alpine_server has only one thread of control running at any point in
time. There is no need to lock data structures because this thread
of control cannot be preempted; it has to voluntarily relinquish CPU by
calling mi_switch(). Thus all the spl* functions are no-ops in Alpine4Linux.

setsoftnet() is also a no-op in Alpine because we run the netisrs
periodically. In Alpine4Linux this happens at every tick (1/HZ secs).

The function do_netisrs() defined in kern/kern_netisr.c is called periodically
by the alpine_server. This function calls all the netisrs ready to run,
and gives them the opportunity to drain packets from their packet queues.

Initialization:

Alpine4Linux initializes the kernel data structures as if the kernel had
booted itself. The alpine_server contains main() that is the entry point
into the program. main() in turn calls init386() followed by mi_startup().

init386():
init386() was rewritten to only initialize the tunable variables in the
kernel like "hz" or "tick". It also initializes physical memory dependent
variables like "maxusers" and "maxproc". Alpine4Linux makes the FreeBSD
kernel believe that it is running on a machine with 1Gbytes of physical
memory.

mi_startup():
This is the stock mi_startup() from the FreeBSD kernel, since we support
sysinit in libAlpineSys.so. This function does not return and control
ends up in the scheduler() function. Alpine4Linux defines the scheduler()
function in alpine_server. Eventually control lands in the main select()
loop defined in sched_main_loop().

Timer management:

Timeout:
Timer management in Alpine4Linux is very simple. In the main select() loop,
we call hardclock() every 10 msec (this interval is based on kern.hz).
If there is any event in the current timer wheel bucket, softclock() is 
called from hardclock(). At that point the stock FreeBSD code is used to deal
with timeout events. slowtimo() and fasttimo() are indirectly called using 
this mechanism.

tsleep() and wakeup():

Alpine4Linux uses the stock tsleep() and wakeup() functions from FreeBSD
without any modifications. The blocking behavior of a process in the kernel
is implemented by mi_switch() that is defined outside the kernel.

Multiple execution contexts in the stack:

The alpine_server provides networking services to multiple clients at the
same time. It is thus imperative that the alpine_server not block in the
kernel. This is the same constraint that the FreeBSD kernel itself operates
under. Anytime a client process does an action that causes it to block (e.g.
a blocking read() on a socket), the alpine_server must store the execution
context and switch to another client process that is ready to run. If there
are no client processes ready to run, the alpine_server blocks in select().
The select() loop of alpine_server is analogous to the idle loop of a Unix
kernel.

The alpine_server provides multiple execution contexts (one for each client),
using the makecontext(3) function available in Linux. It switches between
execution contexts in the FreeBSD kernel using swapcontext(3).

The alpine_server itself executes in a 'ucontext_t' that is accessible as
a global variable (sched_thread->ut_ctx). The alpine_server (and hence 
the FreeBSD stack) executes in this context for system level events like 
timeouts, network I/O etc. 

The alpine_server executes in a 'ucontext_t' associated with a client process
whenever it is executing code in the FreeBSD kernel on behalf of the client
process. For e.g. if the client process sends a messages to the alpine_server
to read() from a socket, the alpine_server first creates a 'ucontext_t' and
switches execution to the newly created context. If all goes well and there
is data to be read, we will reply back to the client_process; the newly
created 'ucontext_t' will be destroyed and control passes back to the
main 'sched_thread' context. If there is not enough data to be read, then
the ucontext_t will need to block in tsleep() and it will call mi_switch().
mi_switch() does a swapcontext() to the main 'sched_thread'. The sched_thread 
either idles on select() or does a swapcontext() to process a request 
from another client.

The alpine_server also has to take care of "woken-up" execution contexts.
For e.g. Consider an execution context that was put to sleep because there
was not enough data to satisfy a read(). When data arrives on that socket,
that execution context becomes runnable (i.e. p->p_stat == SRUN). We check
for such "woken-up" processes just before the sched_thread sleeps in select().
It traverses all the ucontexts that are sleeping state *but* their proc
structure is runnable i.e.(ut->ut_state==UTS_SLEEPING && p->p_stat==SRUN).
if such a ucontext is found it does a swapcontext() to it. The blocked
ucontext resumes execution after the mi_switch() statement in tsleep() just
like it would in a stock FreeBSD kernel.

Interaction with the Linux kernel:

Alpine4Linux is a pure userlevel process and requires no Linux kernel
modifications. But Alpine4Linux is handing out file descriptors to
client programs (fd = socket()); it needs to ensure it does not step on
the Linux kernel's toes when it does so.

Therefore we need to map file descriptors between the FreeBSD stack and the
host OS. To see why we need this, consider a case where an application
issues a socket() system call. This call is intercepted by the libClientSocket
library and a file descriptor is assigned to the newly created socket by
the FreeBSD stack. Lets call this file descriptor the 'alpine_fd'. We need
to ensure that the value we return to the client application is an fd
that is not already been allocated and will not be allocated in the future.
Hence we open("/dev/null") on the host OS and create a mapping between
linux_fd and alpine_fd. The fd that is returned to the client from the
socket() system call is the linux_fd.

When the client comes back to do read() or write() with the linux_fd, we
will map that fd to the alpine_fd and use it in the FreeBSD stack.

Alpine4Linux compared to Alpine4BSD:

Look at the file "differences_from_alpine4bsd.txt" under the docs/ directory
for salient differences between Alpine4Linux and Alpine4BSD.

Performance:

I have not done any performance measurements for Alpine4Linux, because I
am confident that its performance sucks! Since Alpine4Linux does message
passing between the client program and alpine_server there are a lot of
copies of when reading or writing data.

Future work:

Support IPv6, IPSEC etc.

References:
[1] Alpine: A User-Level Infrastructure for Network Protocol Development
    David Ely, Stefan Savage, David Wetherall
    http://alpine.cs.washington.edu/

Appendix A:

The following are the descriptions of the 3 changes I had to make in the
FreeBSD stack to make it work on Linux. All changes are trivial and do
not affect functionality.

netinet/if_ether.c: 
printf on Linux does not have the %D modifier

netinet/in.c: 
ifconfig on Linux do not zero out sin_zero in sockaddr_in when doing
SIOCSIFADDR, SIOCSIFDSTADDR and SIOCSIFBRDADDR. This causes problems 
when binding to that IP address, because ifa_ifwithaddr() compares the 
entire 16 bytes; but there is garbage in the last 8 bytes of ifa->ifa_addr. 
The fix was to zero out sin_zero of ia->ia_addr, ia->ia_dstaddr and 
ia->ia_broadaddr in in_ifinit().

net/if.c:
We map the Linux SIOCSIFHWADDR to the FreeBSD SIOCSIFLLADDR. However 
Linux does not define the sa_len member in its sockaddr structure.
We should not return EINVAL if if the 'sa_len' does not match 
'sdl->sdl_alen' in if_setlladdr().


Introduction:
This file describes the limitations of Alpine4Linux.

Limitations:

Alpine4Linux cannot pass file descriptors from one process to another. Some
programs (e.g. vsftpd) use this feature; a privileged process binds
a socket to a privileged port and then transfers this fd to a less
privileged process to do the actual data transfer. Therefore vsftpd 
"active" mode does not work with Alpine4Linux.

Introduction:

This file describes the differences between the original Alpine
implementation and Alpine4Linux. The original Alpine is referred
to as Alpine4BSD henceforth.

Differences:

Alpine4Linux needs a unique IP address separate from the host OS.
Alpine4BSD shares the IP address already assigned to the host OS.
I chose this approach because:
1. It is simpler (I did not have to write code to share the port-space
   with the host kernel)
2. Alpine4Linux will be used in a research environment where assigning the
   host OS an additional IP address should not be difficult.
As long as the host OS does not send RSTs or ICMP unreach messages to
the sender, we should be fine. Such a "blackhole" behavior can be
configured on a Linux box using iptables. Alpine4Linux provides
a helper script - "run_alpine_server.sh" - that configures iptables
before starting alpine_server. It also cleans up when alpine_server
exits.

Alpine4Linux support fork()! 
This is probably the biggest difference from Alpine4BSD.

Alpine4BSD uses a faux-ethernet device that was newly written to inject
packets into and get packets from the FreeBSD stack. I leveraged the
"tap" pseudo-device already present in the FreeBSD stack to achieve 
identical functionality. No code change were made to the "tap" driver.

Alpine4BSD requires support for BPF devices to be compiled in the
host OS. Alpine4Linux requires support for PF_PACKET sockets in the
host OS.

Alpine4BSD simulates interrupts by polling pcap once every 1ms by using
SIGALRM. We don't have to do that since we put the 'linux_pcap_fd' in
select(), so alpine_server is woken up every time a packet is available
to read on the pcap_fd. In this sense Alpine4Linux is a true interrupt
driven stack.

Q. I don't want the alpine_server to listen on 127.0.0.1:8475. How do I tell
   it to listen for requests on another address?

A. Define the environment variables ALPINE_SERVER_LISTEN_ADDR and 
   ALPINE_SERVER_LISTEN_PORT appropriately. Make sure that the client programs
   also execute in an enviroment with the same variables defined.

Q. I can't ping the Alpine4Linux IP address from the same machine that it
   is running on.

A. Let me describe the setup first, the problem next and the solution
   last.

   The setup:
   Consider that the native linux machine has an interface eth0 with an IP
   address 10.11.12.1. We run Alpine4Linux on the same interface with an IP
   address 10.11.12.13 (./alpine_server eth0 10.11.12.13 255.255.255.0).
   
   The problem:
   Now if we try to ping from the Linux box to 10.11.12.13 we won't be able 
   to "see" the Alpine stack. This is because the ARP request from the Linux 
   box is thrown away by the Alpine stack because it has a source hardware 
   address that Alpine considers to be its own. It believes that it is 
   seeing an echo of its own ARP request and the packet is discarded.
   
   The solution:
   1. Setup the environment in the shell to LD_PRELOAD libClientSocket.so and
      libAlpineSupport.so and set LD_LIBRARY_PATH appropriately. Then run
      ping 10.11.12.13.
   2. Run ping 10.11.12.13 on a different machine that the one hosting the
      Alpine stack.
   3. If the host Linux box has two interfaces, then dedicate one to Alpine
      and use the other one for Linux. Don't assign any IP address (on Linux)
      to the interface assigned to Alpine.

Q. I cannot run "ping". It exits with an error message like:
   "error while loading shared libraries: libClientSocket.so".
A. This happens because "ping" is a setuid program. You should be able to
   get it to work by "su"ing before running "ping". Or you could try to
   use the "ping" program supplied with Alpine4Linux distribution under
   the src/sbin/ping directory. It is not setuid and should with regular
   user permissions.

Q. I get an error like "Error writing select_resp" when I kill a client
   program. Whats up with that ?

A. Its not an error although it looks like one. It happens if a client program
   was sleeping in tsleep() but exited before the sleeping system call had
   completed. For reasons that are too arcane to go into, we wake up the
   sleeping system call as if the process received a SIGKILL. The system
   call returns to alpine_server and it tries to write the response back.
   But since the client program is already dead, it gets an error from
   write() causing this error message. At that point it cleans up state
   associated with the client program (closing open sockets, freeing memory 
   etc).
   The short answer is that it is not an error.

Q. I cannot run the native "route" program against Alpine4Linux. How do I
   setup routes in the FreeBSD stack ?

A. I had a lot of difficulty making the Linux "route" command work with
   the FreeBSD stack. So I had to port the FreeBSD route command for
   Alpine4Linux. You can find it under the $(ALPINE_ROOT)/src/sbin/route
   directory.
   > # Setup the environment correctly
   > export LD_PRELOAD="libClientSocket.so libAlpineSupport.so"
   > export LD_LIBRARY_PATH="$ALPINE_ROOT/src/client_socket:\
           $ALPINE_ROOT/src/alpine_support"
   > # See a route to a particular destination IP
   > $(ALPINE_ROOT)/src/sbin/route/route -n get 10.11.12.13
   > # Now add the default route
   > $(ALPINE_ROOT)/src/sbin/route/route add -- -net 0.0.0.0/0 10.11.12.1

Q. The "sbin/route" program supplied with Alpine4Linux exits with the
   following error: "route: writing to routing socket: No such process"
A. This happens when you query a the routing table with a destination,
   for which a route does not exist. I guess I am messing up when translating
   the errnos between FreeBSD and Linux giving rise to the weird error
   message.
   > $(ALPINE_ROOT)/src/sbin/route/route -n get

Q. I cannot flush the routes from the FreeBSD stack.
A. Sorry. Alpine4Linux does not support sysctl() yet which is needed to
   flush the routes. A lame workaround is to restart the alpine_server.

Q. vsftpd dies with an error "500 OOPS: accept".
A. I have seen this with vsftpd-1.1.1, and I believe it is an error in
   vsftpd; it does not handle select() timeout correctly when listening
   for new connections. It has been fixed in vsftpd-1.1.2 and beyond.

Q. The ftp client talking to vsftpd-1.1.3 transfers data properly but
   the ftp server sends a message "426: Failure writing network stream".
A. This is a bug the vsftpd-1.1.3 and is promised to be fixed in a later
   release according to chris@scary.beasts.org. The bug is that after
   writing the file out using sendfile(), the code checks the errno value
   irrespective of whether an error had occurred.

Q. I cannot use the "active" mode ftp with vsftpd. Whats up with that?
A. See limitations about how Alpine4Linux does not support sending file
   descriptors between processes.

Q. I cannot make the standard Linux "ftp" client use the Alpine stack. It
   simply hangs after connecting to the remote ftp server.
A. Yeah. It sucks. My speculation is that ftp is using getc/putc
   to read/write to the socket and this is going to glibc instead of
   Alpine4Linux. I have not spent any reasonable amount of time 
   diagnosing it so I could be completely wrong.