Wireless Extensions for Linux

Similar documents
Tutorial: Simple WEP Crack

HMS30C7110. WLAN Device Driver. Version 1.0. Multipurpose Network Processor. Hynix Semiconductor Inc.

SWAP and TCP performance

System Administration for Beginners

JetBox 95xx/ 93xx Linux Auto Run Function

Quick guide for configuring a system with multiple IP-LINKs

On-Demand BlueTooth: Experience integrating BlueTooth in Connection Diversity

Nomadic Communications Labs. Alessandro Villani

Agenda. What are we looking at? Introduction. Aim of the project. IP Routing

Lesson 1: Network Communications

Flash Drive Emulation

Implementing the Wireless Token Ring Protocol As a Linux Kernel Module

Multi-Function Wireless Router. User's Guide. Wireless Access Point Broadband Internet Access. 4-Port Switching Hub

Grideye Architecture

A Report on RMI and RPC Submitted by Sudharshan Reddy B

Notes on implementing a IEEE s Mesh Point

Operating- System Structures

mywbut.com UNIX Operating System

PROCESS VIRTUAL MEMORY PART 2. CS124 Operating Systems Winter , Lecture 19

CS 326: Operating Systems. Networking. Lecture 17

Operating System Security, Continued CS 136 Computer Security Peter Reiher January 29, 2008

Design Overview of the FreeBSD Kernel CIS 657

I-GREENHOUSE Aquaponics connected greenhouse

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent?

Wireshark Lab: Getting Started v7.0

BACKUP, CLONE OR IMAGE? WHY YOU SHOULD BE INTERESTED

Project Compiler. CS031 TA Help Session November 28, 2011

(Refer Slide Time: 02.06)

Let us ping! First we will learn the Hello World of a networked machine.

* What are the different states for a task in an OS?

AXIOMWARE SYSTEMS, INC. Netrunr Series. Netrunr Edge Hardware Manual. Rev 1.0. axiomware.com

(Refer Slide Time: 00:30)

A Security Microcosm Attacking and Defending Shiva

Broadband Router DC-202. User's Guide

Requirements, Partitioning, paging, and segmentation

Configuration of Access Points and Clients. Training materials for wireless trainers

Lecture (01) Getting started. Dr. Ahmed ElShafee

TCP/IP Network Essentials

Final Examination CS 111, Fall 2016 UCLA. Name:

Aims. The aims of this unit are to:

Embedded Linux Day 2

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

Virtual File System. Don Porter CSE 506

Virtual File System. Don Porter CSE 306

Using DNS Service for Amplification Attack

A Client-Server Exchange

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

WISNETWORKS. WisOS 11ac V /3/21. Software version WisOS 11ac

Not long ago, home local area networks were proof of their owner s geekhood. They were very

The Effects on Read Performance from the Addition of a Long Term Read Buffer to YAFFS2. Sam Neubardt

NGN: The Evolution of Wireless Networks

Vim: A great tool for your toolbox! 1/13

Introduction CHAPTER. Review Questions

Linux Security & Firewall

Choosing the web s future. Peter-Paul Koch Van Lanschot, 9 February 2017

Vorlesung Kommunikationsnetze

VPN-against-Firewall Lab: Bypassing Firewalls using VPN

Genie Routing lab. Laboration in data communications GenieLab Department of Information Technology, Uppsala University. Overview

Accessing an Extremely Secure LAN Via Remote Access That Was Not Possible With Previous Technologies

Path Awareness and Selection in the Socket Intents prototype. Theresa Enghardt TU Berlin

Technical Introduction

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

TRS2006 Content Manager Plus (CMP)

WISNETWORKS. WisOS 11ac V /3/21. Software version WisOS 11ac

CS197U: A Hands on Introduction to Unix

Lecture (03) Internet Protocol tcp/ip> OSI>

CSE 120 Principles of Operating Systems

Local Area Networks NETW 901

CS197U: A Hands on Introduction to Unix

APPLICATION LAYER APPLICATION LAYER : DNS, HTTP, , SMTP, Telnet, FTP, Security-PGP-SSH.

Wireless Security Algorithms

Introduction to Asynchronous Programming Fall 2014

Midterm 2. 7] Explain in your own words the concept of a handle class and how it s implemented in C++: What s wrong with this answer?

minit Felix von Leitner September 2004 minit

Semester 2, 2018: Lab 1

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

Wireless Security Security problems in Wireless Networks

Wireless Networks. Authors: Marius Popovici Daniel Crişan Zagham Abbas. Technical University of Cluj-Napoca Group Cluj-Napoca, 24 Nov.

Requirements, Partitioning, paging, and segmentation

Lecture 21 Concurrent Programming

Tolerating Malicious Drivers in Linux. Silas Boyd-Wickizer and Nickolai Zeldovich

INTERNET PROTOCOLS NETWORK ASSIGNEMENT. Alexander Havbo Steen ITT 2015 ERHVERVSAKADEMI DANIA

QUICK START GUIDE. Pepwave Express. Quick Start Guide. Pepwave Express. Nov Pepwave

Quality of Service in Wireless Networks Based on Differentiated Services Architecture

An On-demand Minimum Energy Routing Protocol for a Wireless Ad Hoc Network

LINUX OPERATING SYSTEM Submitted in partial fulfillment of the requirement for the award of degree of Bachelor of Technology in Computer Science

AVDECC clarifications. Part 2 AEM commands. Revision 4 [WIP] 8/5/2016

Date: Saturday, November 01, SHDesigns Ethernet Downloader for Z-World Rabbit Boards and the Softools Compiler Copyright (c) 2003 SHDesigns

Unit 5: Distributed, Real-Time, and Multimedia Systems

Operating System Services

Running SNAP. The SNAP Team February 2012

Outline Key Management CS 239 Computer Security February 9, 2004

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

IP Basics Unix/IP Preparation Course June 29, 2010 Pago Pago, American Samoa

CS 111. Operating Systems Peter Reiher

WAP6405. User s Guide. Quick Start Guide. 5GHz AC1750 Gigabit Wireless Bridge. Default Login Details. Version 1.00 Edition 1, 06/2016

Paper. It s all about input, connectivity, decision making, and output instructions.

521262S Computer Networks 2 (fall 2007) Laboratory exercise #2: Internetworking

Pragmatic Guide to Git

Status of P Sub-Specification

Transcription:

Wireless Extensions for Linux Jean Tourrilhes 23 January 97 A Wireless LAN API for the Linux operating system. 1 Introduction The purpose of this document is to give an overview of the Wireless Extensions. The first part will explain the reason of this development and the generals ideas behind this work. Then, we will give the current status of the development. The third part will explore the user interface. We will finish by some implementation details and the possible evolution of the Wireless Extensions. This document is a part of the Linux Wireless LAN Howto. Please refer to it for details. 2 Philosophy & Goal It all started when I tried to install a Wavelan network on Linux computers. I was having a ISA and a PCMCIA versions of the Wavelan, and the two drivers were using totally different methods for the setup and collection of statistics (and in fact fairly incomplete...). As my small hard disks didn t allow me to reboot to DOS to set up those missing parameters, I started to modify the driver code. I decided to define a wireless API which would allow the user to manipulate any wireless networking device in a standard and uniform way. Of course, those devices are fundamentally different, so the standardisation would only be on the methods but not on the values (a Network ID is always a parameter that you may set and get and use to distinguish logical networks, but some devices might use 4 bits and others 16 bits, and the effect of a change may be immediate or delayed after a reconfiguration of the device...). This interface would need to be flexible and extensible. The primary need was for device configuration, but wireless statistics and the development of wireless aware applications was desirable. I needed also something simple to implement and conform to the Linux standard to have something much easier to share and maintain. The interface would need to evolve with the apparition of new products and with specific needs. I tried to be as generic as possible, but I was obliged to restrict myself on a specific set of devices. I focused on the Wireless LAN type of devices (indoor radio networks), which appears in the operating system as a normal network device. AX25 (Amateur Radio) devices are too specific and have already their own specific network stack and tools. I also ruled out cellular data (data over GSM and mobile phone) and medium and long distance wireless communications because their interface are quite different and they don t operate in the same way. InfraRed 1

should be similar enough to Radio LANs to benefit from this interface (if someday an InfraRed network driver for Linux appears). As it was only an extension to the current Linux networking interface, I decided to call it Wireless Extensions. The words interface and API are too ambitious for this simple set of tools. 3 Availability The wireless extensions have been implemented in three complementary parts. The first part is the user interface, a set of tools to manipulate those extensions. The second part is a modification of the Linux kernel to support and define the extensions. The third part is the hardware interface and is implemented in each network driver itself to map the extensions to the actual hardware manipulations. The kernel modifications have been included in the last Linux releases (from 2.0.30 and 2.1.17) and so the kernel now supports them. Users of release 1.2.13 may use a patch to add the support in their kernels. By default, the wireless extensions are disabled, and users need to enable the CONFIG_NET_RADIO option in the kernel configuration (this is the option which enables the choice of radio interfaces in the network driver list). The tools are quite simple and so should be able to compile in any Linux system provided that the kernel supports wireless extensions. The modifications of the wireless network drivers are probably the most important. Each driver needs to support wireless extensions and to perform the corresponding dialogue with the specific hardware. For now, only the Wavelan ISA and the Wavelan PCMCIA drivers support wireless extensions, but I m confident that others will eventually follow. The modified Wavelan PCMCIA driver is available in the last pcmcia packages (from 2.9.1). The modified Wavelan ISA driver is available in the kernel (from 2.0.30 and 2.1.17). 4 User interface and tools The user interface is composed of 3 programs and a /proc entry. The main goal of the Wireless Extension development effort wasn t the user interface, so this interface is quite basic. 4.1 /proc/net/wireless This is a /proc entry. /proc is a pseudo file system giving information and statistics about the current system, which is usually located in /proc. These entries act as files, so a cat on them will give the required information. /proc/net/wireless is designed to give some wireless specific statistics on each wireless interface in the system. This entry is in fact a clone of /proc/net/dev which gives the standard driver statistics. The output looks like this : <jean@tourrilhes>cat /proc/net/wireless Inter- sta Quality Discarded packets 2

face tus link level noise nwid crypt misc eth2: f0 15. 24. 4. 181 0 0 For each device, the following information is given : Status : Its current state. This is a device dependent information. Quality - link : general quality of the reception. Quality - level : signal strength at the receiver. Quality - noise : silence level (no packet) at the receiver. Discarded - nwid : number of discarded packets due to invalid network id. Discarded - crypt : number of packet unable to decrypt. Discarded - misc : unused (for now). These informations allow the user to have a better feedback about his system. A high value of Discarded - nwid packet might indicate a nwid configuration problem or an adjacent network. The Quality - level might help him to track shadow areas. The basic difference between Quality - link and Quality - level is that the first indicate how good the reception is (for example the percentage of correctly received packets) and the second how strong the signal is. The Quality - level is some directly measurable data that is likely to have the same signification across devices. When the Quality values have been updated since the last read of the entry, a dot will follow that value (typically, it mean that a new measure has been made). 4.2 iwconfig This tool is designed to configure all the wireless specific parameters of the driver and the hardware. This is a clone of ifconfig used for standard device configuration. The following parameters are available : freq or channel : the frequency or the channel sequence. nwid : network id or domain, to distinguish different logical networks. the name of the protocol used on the air. sens : this is the signal level threshold to trigger packet reception (sensitivity). enc : the encryption or scrambling key used. The frequency or channel parameter is the physical separation between networks (the keyword freq and channel are synonymous). For frequency hopping devices, it might be the hopping pattern. On the other hand, the nwid is only a logical (virtual) separation between networks which might be on the same frequency. The name of the protocol is often the generic name of the device itself (for example Wavelan ). This is quite useful because these protocols are all incompatible. The apparition of standards such as 802.11 and HiperLan might help a bit in the future. 3

The encryption setting includes the key itself (up to 64 bits), the activation of encryption (on/off) and an optional argument (either the type of algorithm or the key number for multi key systems). Without any argument, iwconfig gives the value of these parameters (and the content of /proc/net/wireless) : <jean@tourrilhes>iwconfig lo no wireless extensions. eth1 eth2 no wireless extensions. Wavelan NWID:1234 Frequency:2.422GHz Sensitivity:4 Link quality:15/15 Signal level:22/63 Noise level:0/63 Rx invalid nwid:181 invalid crypt:0 invalid misc:0 By giving a command line option, the user may change these parameters (if it is possible in the driver and if the user is root). For example, to change the frequency to 2.462 GHz and disable nwid checking on the device eth2, the user will do : #iwconfig eth2 freq 2.462G nwid off The user may also list the available frequencies for a specific device or the number of channels defined : <jean@tourrilhes>iwconfig eth2 list_freq 10 channels ; available frequencies : 2.422GHz 2.425GHz 2.4305GHz 2.432GHz 2.442GHz 2.452GHz 2.46GHz 2.462GHz 4.3 iwspy iwspy was designed to test the Mobile IP support. It allows the user to set a list of network addresses in the driver. The driver will gather quality information for each of those addresses (updated each time it receives a packet from that address). The tool allows the user to display the information associated with each address in the list. iwspy accept IP address as well as hardware addresses (MAC). IP addresses will be converted to hardware addresses before being transmitted to the driver. No verification is made on the hardware address. On the command line, hardware addresses should be prefixed by the keyword hw : #iwspy eth2 15.144.104.4 hw 08:00:0E:21:3A:1F The tool accept the keyword + to add the new addresses at the end of the list : #iwspy eth2 + hw 08:00:0E:2A:26:FA To display the list of address : 4

<jean@tourrilhes>iwspy eth2 08:00:0E:21:D7:4E : Quality 15 ; Signal 29 ; Noise 0 (updated) 08:00:0E:21:3A:1F : Quality 0 ; Signal 0 ; Noise 0 08:00:0E:2A:26:FA : Quality 0 ; Signal 0 ; Noise 0 The (updated) indication show that we have received a packet since we set the address in the driver. We haven t received anything from the second and third address (this explain why the values are 0). A ping to those address should solve the problem. The number of addresses is limited to 8, because each address slow down the driver (it increases the processing for each received packets). 4.4 iwpriv iwpriv is some experimental support for device specific extensions. Some drivers (like the Wavelan one) might define some extra parameters or functionality, iwpriv is used to manipulate those. 5 Driver interface & programming issues The implementation of the wireless extensions was designed to minimise the number of changes in the kernel and to have a simple and extensible solution. All the wireless interface (types and constants) is defined in the file /usr/ include/linux/wireless.h. This is the central piece of the wireless extension. 5.1 /proc/net/wireless This /proc entry is a clone of the /proc/net/dev entry and has been implemented in exactly the same way. The Linux networking stack uses a structure (struct device) to keep track of each device in the system. The first part of it is standardised, and contains parameters (for example the base I/O address and the IP address of the device) and callbacks (the procedure to start the device, to send a packet...). I ve added to this structure another standard callback (get_wireless_stats) to get the wireless statistics that /proc/net/wireless needs. When the /proc entry is read, it calls this callback for all the devices present in the system and display the information it gets. If a device doesn t define this callback, it is ignored. When called, the get_wireless_stats callback returns a structure (struct iw_statistics) containing all the fields that will be displayed by the /proc entry. This structure is of course defined in the file /usr/include/linux/wireless.h. 5.2 ioctl The usual method in Unix to set and get parameters from a network device is through ioctl. Ioctl are usually operations performed on a file descriptor, but they also apply on network sockets. The ioctl is a kernel system call. The arguments of the ioctl define the operations to be done, the parameters of these operations and the device they applies to. 5

For example, to change the IP address on device eth2, a program (like ifconfig) would make an ioctl call with the following parameters : eth2, SIOCSIFADDR, new address. The structure defining the parameters layout may be found in /usr/include/linux/if.h and the ioctl call (the constant SIOCSIFADDR) is defined in /usr/include/linux/sockios.h. For the wireless extensions, I ve defined a new set of ioctl calls (for example SIOCSIWFREQ to change the frequency). I ve also defined the parameters to those calls (see /usr/include/linux/wireless.h). In fact those new calls map closely to the functionality offered by the wireless tools. There is another popular way to set parameters in a network driver in Linux, which is initialisation parameters (either passed on the kernel command line or at module initialisation). This method has the disadvantage that the parameters may only be set (and not read) and only at initialisation time, which offers much less flexibility than the current solution. The other advantage of ioctl is that it is a programming interface (and not only a user interface), so any program (such as a Mobile IP implementation) may manipulate them directly. 5.3 More details For people who needs more details on the actual implementation, the list of ioctl calls or the parameters definitions, the ultimate reference is the source code. The file /usr/include/linux/wireless.h defines all the necessary pieces. The wireless tools offer some good examples on how to use the ioctl calls. To know how the wireless extensions are used on the driver side, the Wavelan driver source will answer most questions. 6 Areas of improvement 6.1 Other drivers For now, only the Wavelan driver supports the wireless extensions. The implementation of the Wireless Extensions in other wireless network drivers might help to validate the Wireless Extensions genericity and to refine its definition. The problem is that quite few wireless devices have Linux drivers available. Also the implementation of wireless extensions in some case is not that easy. For example, the code to change the frequency in the Wavelan driver is quite large and complex. 6.2 Users tools They should be extended and refined. We could also imagine the development of a graphical interface (for example to have a small graph bar like for battery charge and system load). 6.3 Wireless Aware applications The development of wireless aware applications will allow to demonstrate the concept and to expand the wireless extensions with the needs of those applications. Mobile IP seems an obvious target. 6