Commit 1ef3bd3b authored by Phil Blundell's avatar Phil Blundell

Initial revision

parents
This diff is collapsed.
Tue Sep 23 20:58:27 1997 Philip Blundell <Philip.Blundell@pobox.com>
* ifconfig.c (if_getstats): use _PATH_PROCNET_DEV rather than
hardcoding.
* lib/pathnames.h (_PATH_PROCNET_DEV): define.
* ifconfig.c (set_flag): tidy up.
(clr_flag): likewise.
Sun Sep 21 18:26:24 1997 Philip Blundell <Philip.Blundell@pobox.com>
* Makefile (RELEASE): set to 1.432
* version.h (RELEASE): likewise.
* TODO: updated.
* README: likewise.
* ifconfig.c (set_flag): print error message if no such interface.
(clr_flag): likewise.
* lib/net-features.h: remove ipfw stuff, add INET6
* netstat.c: include <net/route.h> for net-features. Patch by
Roderich Schupp <rsch@ExperTeam.de>
* route.c: likewise.
\ No newline at end of file
net-tools
INSTALLING
Please read the file `README' before you start with the installation of the
net-tools.
HACKERS WAY
-----------
cd /usr/src ; tar xvzf net-tools*.tar.gz
less Makefile ; make config ; make ; make -n install ; make install
CONFIGURE
---------
First of all change into the net-tools directory.
Before you start with the Installation please have a look into the toplevel
Makefile. There are some configuration options with explanations.
To configure the compilation use "make config".
If you have a recent Kernel you can and SHOULD answer ALL the Configuration
Options with YES. You only have to decide about the NLS:
If you don't know whether NLS is supported on your system or not, see
/usr/include/locale.h. If it exists, there is every chance that NLS is
supported. You also need the "gencat" program if you want to compile with
National Language Support.
On some BETA Releases NLS is disabled, cause the catalougs are out of sync
with the development source-tree.
COMPILE
-------
To compile simply use "make".
There should be no warnings or errors.
INSTALLATION
------------
If you want to install the binaries use "make install".
This will generate backups of your old binaries. If you dont want the
backups, please use "make update" instead. To change the default permissions
and ownerships of the installed binaries and manpages edit the Makefile. You
can test the Installation with "make -n install". This will tell make: Don't
run any commands, just print them.
Bernd 'eckes' Eckenfels
<net-tools@lina.inka.de>
#
# Makefile Main Makefile for the net-tools Package
#
# NET-TOOLS A collection of programs that form the base set of the
# NET-3 Networking Distribution for the LINUX operating
# system.
#
# Version: Makefile 1.33 (1996-05-18)
#
# Author: Bernd Eckenfels <net-tools@lina.inka.de>
# Copyright 1995-1996 Bernd Eckebnfels, Germany
#
# URLs: ftp://ftp.inka.de/pub/comp/Linux/networking/NetTools/
# ftp://ftp.linux.org.uk/pub/linux/Networking/PROGRAMS/NetTools/
# http://www.inka.de/sites/lina/linux/NetTools/index_en.html
#
# Based on: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# Copyright 1988-1993 MicroWalt Corporation
#
# Modifications:
# Extensively modified from 01/21/94 onwards by
# Alan Cox <A.Cox@swansea.ac.uk>
# Copyright 1993-1994 Swansea University Computer Society
#
#
# {1.20} Bernd Eckenfels: Even more modifications for the new
# package layout
# {1.21} Bernd Eckenfels: Check if config.in is newer than
# config.status
# {1.22} Bernd Eckenfels: Include ypdomainname and nisdomainame
#
# 1.3.50-BETA6 private Release
#
#960125 {1.23} Bernd Eckenfels: Peter Tobias' rewrite for
# makefile-based installation
# 1.3.50-BETA6a private Release
#
#960201 {1.24} Bernd Eckenfels: net-features.h added
#
#960201 1.3.50-BETA6b private Release
#
#960203 1.3.50-BETA6c private Release
#
#960204 1.3.50-BETA6d private Release
#
#960204 {1.25} Bernd Eckenfels: DISTRIBUTION added
#
#960205 1.3.50-BETA6e private Release
#
#960206 {1.26} Bernd Eckenfels: afrt.o removed (cleaner solution)
#
#960215 1.3.50-BETA6f Release
#
#960216 {1.30} Bernd Eckenfels: net-lib support
#960322 {1.31} Bernd Eckenfels: moveable netlib, TOPDIR
#960424 {1.32} Bernd Eckenfels: included the URLs in the Comment
#
#960514 1.31-alpha release
#
#960518 {1.33} Bernd Eckenfels: -I/usr/src/linux/include comment added
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at
# your option) any later version.
#
# set the base of the Installation
# BASEDIR = /mnt
#
# DON'T CHANGE ANY of the NLS-Support definitions, it's disabled
#
# set default language (DEF_LANG) to en_US.88591 if you don't use NLS
DEF_LANG = en_US.88591
# install national language support for the following languages
# ADD_LANG = fr_FR.88591 de_DE.88591
# path to the net-lib support library. Default: lib
NET-LIB-PATH = lib
NET-LIB-NAME = support
PROGS = ifconfig hostname arp netstat route rarp
# Compiler and Linker Options
# You may need to uncomment and edit these if you are using libc5.
COPTS = -O2 -Wall -g # -I/usr/inet6/include
LOPTS =
RESLIB = # -L/usr/inet6/lib -linet6
# -------- end of user definitions --------
MAINTAINER = Philip.Blundell@pobox.com
RELEASE = 1.433
.EXPORT_ALL_VARIABLES:
ifeq ("$(NET-LIB-PATH)","lib2")
TOPDIR = ..
else
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
endif
NET-LIB = $(NET-LIB-PATH)/lib$(NET-LIB-NAME).a
CFLAGS = $(COPTS) -I. -I./include/ -I$(NET-LIB-PATH)
LDFLAGS = $(LOPTS) -L$(NET-LIB-PATH)
SUBDIRS = man/ $(NET-LIB-PATH)/
CC = gcc
LD = gcc
NLIB = -l$(NET-LIB-NAME)
USE_NLS := $(shell grep -s 'define NLS 1' config.h)
MDEFINES = COPTS='$(COPTS)' LOPTS='$(LOPTS)' TOPDIR='$(TOPDIR)'
%.o: %.c config.h version.h net-locale.h net-features.h $<
$(CC) $(CFLAGS) -c $<
all: config.h version.h subdirs $(PROGS)
config: cleanconfig config.h
install: all savebin installbin installdata
update: all installbin installdata
clean:
rm -f *.o DEADJOE config.new *~ *.orig lib/*.o
@for i in $(SUBDIRS); do (cd $$i && make clean) ; done
cleanconfig:
rm -f config.h
clobber: clean
rm -f $(PROGS) config.h version.h config.status
@for i in $(SUBDIRS); do (cd $$i && make clobber) ; done
dist: clobber
@echo Creating net-tools-$(RELEASE) in ..
@tar -cvz -f ../net-tools-$(RELEASE).tar.gz -C .. net-tools
config.h: config.in Makefile
@echo "Configuring the Linux net-tools (NET-3 Base Utilities)..." ; echo
@if [ config.status -nt config.in ]; \
then ./configure.sh <config.status; \
else ./configure.sh <config.in; \
fi
version.h: Makefile
@echo "#define RELEASE \"net-tools $(RELEASE)\"" >version.h
$(NET-LIB): config.h version.h net-locale.h libdir
net-locale.h: nlsdir
libdir:
@$(MAKE) -C $(NET-LIB-PATH) $(MDEFINES)
nlsdir:
@$(MAKE) -C nls
subdirs:
@for i in $(SUBDIRS); do $(MAKE) -C $$i $(MDEFINES) ; done
ifconfig: $(NET-LIB) ifconfig.o
$(CC) $(LDFLAGS) -o ifconfig ifconfig.o $(NLIB) $(RESLIB)
hostname: hostname.o
$(CC) $(LDFLAGS) -o hostname hostname.o
route: $(NET-LIB) route.o
$(CC) $(LDFLAGS) -o route route.o $(NLIB) $(RESLIB)
arp: $(NET-LIB) arp.o
$(CC) $(LDFLAGS) -o arp arp.o $(NLIB) $(RESLIB)
rarp: $(NET-LIB) rarp.o
$(CC) $(LDFLAGS) -o rarp rarp.o $(NLIB)
netstat: $(NET-LIB) netstat.o statistics.o
$(CC) $(LDFLAGS) -o netstat netstat.o statistics.o $(NLIB) $(RESLIB)
installbin:
install -o root -g root -m 0755 arp ${BASEDIR}/sbin
install -o root -g root -m 0755 ifconfig ${BASEDIR}/sbin
install -o root -g root -m 0755 netstat ${BASEDIR}/bin
install -o root -g root -m 0755 rarp ${BASEDIR}/sbin
install -o root -g root -m 0755 route ${BASEDIR}/sbin
install -o root -g root -m 0755 hostname ${BASEDIR}/bin
ln -fs hostname $(BASEDIR)/bin/dnsdomainname
ln -fs hostname $(BASEDIR)/bin/ypdomainname
ln -fs hostname $(BASEDIR)/bin/nisdomainname
ln -fs hostname $(BASEDIR)/bin/domainname
savebin:
@for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \
${BASEDIR}/bin/netstat \
${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \
${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \
${BASEDIR}/bin/dnsdomainname ${BASEDIR}/bin/nisdomainname \
${BASEDIR}/bin/domainname ; do \
[ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved.
installdata:
install -o root -g root -m 0644 man/${DEF_LANG}/arp.8 ${BASEDIR}/usr/man/man8
install -o root -g root -m 0644 man/${DEF_LANG}/ifconfig.8 ${BASEDIR}/usr/man/man8
install -o root -g root -m 0644 man/${DEF_LANG}/netstat.8 ${BASEDIR}/usr/man/man8
install -o root -g root -m 0644 man/${DEF_LANG}/rarp.8 ${BASEDIR}/usr/man/man8
install -o root -g root -m 0644 man/${DEF_LANG}/route.8 ${BASEDIR}/usr/man/man8
install -o root -g root -m 0644 man/${DEF_LANG}/hostname.1 ${BASEDIR}/usr/man/man1
install -o root -g root -m 0644 man/${DEF_LANG}/dnsdomainname.1 ${BASEDIR}/usr/man/man1
install -o root -g root -m 0644 man/${DEF_LANG}/ypdomainname.1 ${BASEDIR}/usr/man/man1
install -o root -g root -m 0644 man/${DEF_LANG}/nisdomainname.1 ${BASEDIR}/usr/man/man1
install -o root -g root -m 0644 man/${DEF_LANG}/domainname.1 ${BASEDIR}/usr/man/man1
install -o root -g root -m 0644 man/${DEF_LANG}/ethers.5 ${BASEDIR}/usr/man/man5
#ifneq ($(USE_NLS), "")
# if [ "${DEF_LANG}" != "en_US.88591" ]; then \
# install -o root -g root -m 0755 -d ${BASEDIR}/usr/lib/locale/${DEF_LANG} ;\
# install -o root -g root -m 0644 nls/${DEF_LANG}/nettools.cat ${BASEDIR}/usr/lib/locale/${DEF_LANG} ;\
# fi
# for i in $(ADD_LANG); do \
# install -o root -g root -m 0755 -d ${BASEDIR}/usr/lib/locale/$$i ;\
# install -o root -g root -m 0644 nls/$$i/nettools.cat ${BASEDIR}/usr/lib/locale/$$i ;\
# if [ -d man/$$i ]; then \
# install -o root -g root -m 0755 -d ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/arp.8 ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/ifconfig.8 ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/netstat.8 ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/rarp.8 ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/route.8 ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/hostname.1 ${BASEDIR}/usr/man/$$i/man1 ;\
# install -o root -g root -m 0644 man/$$i/dnsdomainname.1 ${BASEDIR}/usr/man/$$i/man1 ;\
# install -o root -g root -m 0644 man/$$i/ypdomainname.1 ${BASEDIR}/usr/man/$$i/man1 ;\
# install -o root -g root -m 0644 man/$$i/nisdomainname.1 ${BASEDIR}/usr/man/$$i/man1 ;\
# install -o root -g root -m 0644 man/$$i/domainname.1 ${BASEDIR}/usr/man/$$i/man1 ;\
# fi ;\
# done
#endif
# End of Makefile.
README
Information about the net-tools package
NET-TOOLS A collection of programs that form the base set of the
NET-3 networking distribution for the Linux operating
system.
This package includes the important tools for controlling the network
subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
netstat, rarp and route.
Please include the output of "program --version" when reporting bugs.
Contents:
README This file.
README.ipv6 Notes for people hacking IPv6.
INSTALLING Installation instructions.
COPYING Your free copy of the GNU Public License.
TODO Some things that need to be done.
Notes
-----
This is net-tools 1.432. You need kernel 2.0 or later to use these programs.
These programs should compile cleanly with either glibc or libc5.
There is no NLS support in this distribution. The files are out of date.
Unless a volunteer is found soon to maintain the translations, NLS will be
dropped altogether.
ipfw has been removed from the distribution. Use ipfwadm instead; get
it at <ftp://ftp.xos.nl/pub/linux/ipfwadm/>.
route/netstat -r do not yet support different AF cleanly. IPX/DDP/AX25
people, please feel free to add the code.
ifconfig now supports changing media types for interfaces. This requires
a recent 2.1.x kernel, and many devices do not support it yet.
The documentation is slimmed down. I think most of it was out of
date.
Phil Blundell
philb@gnu.ai.mit.edu
21st September 1997
Notes for IPv6.
If you are using libc5, you may need to edit the Makefile so that
libinet6 is linked in and your IPv6 include files are found in the
right place. The definitions in question are at about line 91.
If you use glibc, you should get the latest 2.1 snapshot. In this
case you do not need to edit the Makefile or apply any patches.
Version 2.0 of glibc has no support for IPv6.
Not all the IPv6 functionality is implemented in the kernel. As of
2.1.51, the code to delete IPv6 routes is still missing, and these
operations will fail silently. The code to delete IPv6 interface
addresses has been written, but not yet (again, as of 2.1.51) merged
with the mainstream kernel distribution.
You may find that you are missing files such as <netinet/ip6.h>. This is
not a bug in net-tools; you should find some newer include files.
TODO for net-tools
[ ] netstat manpage and code cleanup, ddp support
[ ] lib/netrom_rt.c rprint should not rewind _PATH_PROCNET_NR_NEIGH
[ ] ARPHRD_METRICOM [1.3.82]
[ ] include proxy arp description into man page.
[ ] netstat -i: XOVR!=compressed
[ ] nettools.8 man-page
[ ] lib/ddp.c: /etc/atalk.names support
[ ] lib/ether.c: /etc/ether support
[ ] share source between netstat/ifconfig (lib/if_info.c)
[ ] ARPHDR_LOOPBACK in new kernels, ok? dont think so :-/
[ ] ARPHRD_LOCALTLK and aarp?
[ ] ARCNET support? linux/drivers/net/arcnet.c
[ ] ifconfig support for isdn4linux, linefill...
[ ] Wilfred's Suggestion for config files for route and ifconfig (expand arp
file format)
[ ] make netstat display more interesting states from interface
(CSLIP? BSDCOMP?)
[ ] netstat netconfiguration info screen (forwarding, supplied protocols...)
[ ] net-features.h in all tools
[ ] check netstat -o
[ ] supply some informations about new features to HOWTOs
[ ] Need to include Jos Vos ipfwadm <ftp.xos.nl>
[ ] Config file only works with bash not ash.
[ ] Token ring is almost totally untested.
[ ] additional tools for IPX, AX.25 etc be bundled [ipxripd004, ipx_* tools
from caldera, axattach] into existing bins
[ ] "SIOCAX25OPTRT" [Joerg (DL1BKE)]. 1.3.75
[ ] dummy NOARP?! (2. default route for preveting hostunreachables on linedrop)
[ ] ppp_dev_stat called for each dev in ifconfig, why? (1.3.17)
[ ] linux/include/net/br.h?
[ ] update fr/de translations (or drop NLS entirely)
This diff is collapsed.
#
# config.in Configure.sh source for the net-tools.
# This file contains the definition of what the support
# library contains. Most of all, it defines which types
# of address families and hardware we know of.
#
# NET-TOOLS A collection of programs that form the base set of the
# NET-3 Networking Distribution for the LINUX operating
# system.
#
# Version: config.in 1.04 (96-04-24)
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# Copyright 1988-1993 MicroWalt Corporation
#
# Bernd 'eckes' Eckenfels <net-tools@lina.inka.de>
#
# Modified:
# {1.01} Bernd Eckenfels: generates more verbose config.h file
#960125 {1.02} Bernd Eckenfels: reordered
#960215 {1.03} Bernd Eckenfels: NET/ROM (Jonathan)
#960424 {1.04} Bernd Eckenfels: NLS disabled, FR added
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at
# your option) any later version.
#
= /*
= * config.h Automatically generated configuration includefile
= *
= * NET-TOOLS A collection of programs that form the base set of the
= * NET-3 Networking Distribution for the LINUX operating
= * system.
= *
= * DO NOT EDIT DIRECTLY
= *
= * Version: Generated from "config.in 1.04 (96-04-24)"
= */
#*
#*
#* NLS
#*
#* (National Language Support)
#*
#* In this BETA Release the NLS is disabled, cause the catalougs
#* are completely outdated.
#*
#
#
#= #define NLS 0
#
#
# * (answer 'n' if you haye no system with national language support)
# *
# bool 'Does your system support NLS?' NLS n
#: Does your system support NLS? (NLS) [n] NO
*
*
* Protocol Families.
*
bool 'UNIX protocol family' HAVE_AFUNIX y
bool 'INET (TCP/IP) protocol family' HAVE_AFINET y
bool 'INET6 (IPv6) protocol family' HAVE_AFINET6 n
bool 'Novell IPX/SPX protocol family' HAVE_AFIPX y
bool 'Appletalk DDP protocol family' HAVE_AFATALK y
bool 'AX25 (Packet Radio) protocol family' HAVE_AFAX25 y
bool 'NET/ROM (Packet Radio) protocol family' HAVE_AFNETROM y
*
*
* Device Hardware types.
*
bool 'Ethernet (generic) support' HAVE_HWETHER y
bool 'ARCnet support' HAVE_HWARC y
bool 'SLIP (serial line) support' HAVE_HWSLIP y
bool 'PPP (serial line) support' HAVE_HWPPP y
bool 'IPIP Tunnel support' HAVE_HWTUNNEL y
bool 'Token ring (generic) support' HAVE_HWTR y
bool 'AX25 (Packet Radio) support' HAVE_HWAX25 y
bool 'NET/ROM (Packet Radio) support' HAVE_HWNETROM y
bool 'DLCI/FRAD (Frame Relay) support' HAVE_HWFR y
bool 'SIT (IPv6-in-IPv4) support' HAVE_HWSIT n
#!/bin/bash
#
# Configure.sh Generates interactively a config.h from config.in
#
# net-tools A collection of programs that form the base set of the
# NET-3 Networking Distribution for the LINUX operating
# system.
#
# Usage: Install.sh [--nobackup] [--test]
#
# Version: Install.sh 1.65 (1996-01-12)
#
# Authors: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# Johannes Grosen, <grosen@argv.cs.ndsu.nodak.edu>
# Copyright 1988-1993 MicroWalt Corporation
#
# Modified:
# {1.65} Bernd eckes Eckenfels <net-tools@lina.inka.de>
# some layout cleanups, slattach/plipconfig removed.
# --test for testinstallations added.
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at
# your option) any later version.
#
#
# Make sure we're really running bash.
#
# I would really have preferred to write this script in a language with
# better string handling, but alas, bash is the only scripting language
# that I can be reasonable sure everybody has on their Linux machine.
#
CONFIG=config.h
[ -z "$BASH" ] && { echo "Configure requires bash" 1>&2; exit 1; }
# Disable filename globbing once and for all.
# Enable function cacheing.
set -f -h
#
# readln reads a line into $ans.
#
# readln prompt default
#
function readln()
{
echo -n "$1"
IFS='@' read ans </dev/tty || exit 1
[ -z "$ans" ] && ans=$2
}
# bool processes a boolean argument
#
# bool tail
#
function bool()
{
# Slimier hack to get bash to rescan a line.
eval "set -- $1"
ans=""
while [ "$ans" != "y" -a "$ans" != "n" ]
do
readln "$1 ($2) [$3] " "$3"
done
if [ "$ans" = "y" ]; then
echo "#define $2 1" >>${CONFIG}
else
echo "#define $2 0" >>${CONFIG}
fi
raw_input_line="bool '$1' $2 $ans"
eval "$2=$ans"
}
# int processes an integer argument
#
# int tail
#
function int()
{
# Slimier hack to get bash to rescan a line.
eval "set -- $1"
ans="x"
while [ $[$ans+0] != "$ans" ];
do
readln "$1 ($2) [$3] " "$3"
done
echo "#define $2 ($ans)" >>${CONFIG}
raw_input_line="int '$1' $2 $ans"
eval "$2=$ans"
}
#
# Make sure we start out with a clean slate.
#
> config.new
> ${CONFIG}
stack=''
branch='t'
while IFS='@' read raw_input_line
do
# Slimy hack to get bash to rescan a line.
read cmd rest <<-END_OF_COMMAND
$raw_input_line
END_OF_COMMAND
if [ "$cmd" = "*" ]; then
if [ "$branch" = "t" ]; then
echo "$raw_input_line"
# echo "# $rest" >>$CONFIG
if [ "$prevcmd" != "*" ]; then
echo >>${CONFIG}
echo "/* $rest" >>${CONFIG}
else
echo " * $rest" >>${CONFIG}
fi
prevcmd="*"
fi
else
[ "$prevcmd" = "*" ] && echo " */" >>${CONFIG}
prevcmd=""
case "$cmd" in
=) [ "$branch" = "t" ] && echo "$rest" >>${CONFIG};;
:) [ "$branch" = "t" ] && echo "$raw_input_line" ;;
int) [ "$branch" = "t" ] && int "$rest" ;;
bool) [ "$branch" = "t" ] && bool "$rest" ;;
exec) [ "$branch" = "t" ] && ( sh -c "$rest" ) ;;
if) stack="$branch $stack"
if [ "$branch" = "t" ] && eval "$rest"; then
branch=t
else
branch=f
fi ;;
else) if [ "$branch" = "t" ]; then
branch=f
else
read branch rest <<-END_OF_STACK
$stack
END_OF_STACK
fi ;;
fi) [ -z "$stack" ] && echo "Error! Extra fi." 1>&2
read branch stack <<-END_OF_STACK
$stack
END_OF_STACK
;;
esac
fi
echo "$raw_input_line" >>config.new
done
[ "$prevcmd" = "*" ] && echo " */" >>${CONFIG}
[ -z "$stack" ] || echo "Error! Untermiated if." 1>&2
mv config.new config.status
exit 0
This diff is collapsed.
This diff is collapsed.
/* Sanitised ipx.h for net-tools. */
#ifndef _IPX_H_
#define _IPX_H_
#define IPX_NODE_LEN 6
#define IPX_MTU 576
struct sockaddr_ipx
{
#if LINUX_VERSION_CODE > 131328 /* 2.1.0 or later */
sa_family_t sipx_family;
#else
short sipx_family;
#endif
unsigned short sipx_port;
unsigned long sipx_network;
unsigned char sipx_node[IPX_NODE_LEN];
unsigned char sipx_type;
unsigned char sipx_zero; /* 16 byte fill */
};
#define IPX_FRAME_NONE 0
#define IPX_FRAME_SNAP 1
#define IPX_FRAME_8022 2
#define IPX_FRAME_ETHERII 3
#define IPX_FRAME_8023 4
#define IPX_FRAME_TR_8022 5
#endif
#
# lib/Makefile Makefile for the net-lib function collection
#
# NET-LIB A collection of functions used from the base set of the
# NET-2 Networking Distribution for the LINUX operating
# system. (net-tools, net-drivers)
#
# Version: lib/Makefile 1.27 (1996-04-13)
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# Copyright 1993 MicroWalt Corporation
#
# Modification:
#960125 {1.21} Bernd Eckenfels: reformated, layout
#960203 {1.22} Bernd Eckenfels: afrt.o will include all the
# routing support into the binaries.
#960206 {1.23} Bernd Eckenfels: better solution wit route_init
#960215 {1.24} Bernd Eckenfels: ax25_rt.o added
#960221 {1.25} Bernd Eckenfels: getroute/setroute.o
#960322 {1.26} Bernd Eckenfels: ACTOBJS support
#960413 {1.27} Bernd Eckenfels: Mike McLagan FRAD Support (frame.c)
#960809 {1.xx} Frank Strauss: inet6.c inet6_gr.c
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at
# your option) any later version.
#
HWOBJS = hw.o loopback.o slip.o ether.o ax25.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o
AFOBJS = unix.o inet.o inet6.o ax25.o ipx.o ddp.o ipx.o netrom.o af.o
AFGROBJS = inet_gr.o inet6_gr.o ipx_gr.o ddp_gr.o netrom_gr.o ax25_gr.o getroute.o
AFSROBJS = inet_sr.o inet6_sr.o netrom_sr.o ipx_sr.o setroute.o
ACTOBJS = slip_ac.o ppp_ac.o activate.o
VARIA = getargs.o masq_info.o
NLSMISC = net-string.o
OBJS = $(NLSMISC) $(VARIA) $(AFOBJS) $(HWOBJS) \
$(AFGROBJS) $(AFSROBJS) $(ACTOBJS)
# This can be overwritten by the TOPLEVEL Makefile
TOPDIR=..
COPTS = -O2 -Wall -fomit-frame-pointer #-DDEBUG
LOPTS = -s
CFLAGS = $(COPTS) -I. -I$(TOPDIR) -I$(TOPDIR)/include
LDFLAGS = $(LOPTS)
all: libsupport.a
libsupport.a: Makefile $(TOPDIR)/config.h $(OBJS)
@echo Building libsupport.a
@rm -f libsupport.a
@ar rcs libsupport.a $(OBJS)
@ranlib libsupport.a
clean:
rm -f *.o *~ *.orig
clobber: clean
rm -f *.a
# End of lib/Makefile.
/*
* lib/activate.c This file contains a small interface function to
* use the HW specific activate routines for line
* disciplines
*
* NET-LIB A collection of functions used from the base set of the
* NET-3 Networking Distribution for the LINUX operating
* system. (net-tools, net-drivers)
*
* Version: lib/activate.c 0.01 (1996-03-22)
*
* Author: Bernd 'eckes' Eckenfels <net-tools@lina.inka.de>
* Copyright 1996 Bernd Eckenfels, Germany
*
* Modifications:
*
*960322 {0.01} Bernd Eckenfels: creation
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include <stdio.h>
#include <string.h>
#include "net-support.h"
#include "pathnames.h"
#include "version.h"
#include "config.h"
#include "net-locale.h"
extern struct hwtype slip_hwtype;
extern struct hwtype cslip_hwtype;
extern struct hwtype slip6_hwtype;
extern struct hwtype cslip6_hwtype;
extern struct hwtype adaptive_hwtype;
extern struct hwtype ppp_hwtype;
extern int SLIP_activate(int fd);
extern int CSLIP_activate(int fd);
extern int SLIP6_activate(int fd);
extern int CSLIP6_activate(int fd);
extern int ADAPTIVE_activate(int fd);
extern int PPP_activate(int fd);
void
activate_init(void)
{
#if HAVE_HWSLIP
slip_hwtype.activate = SLIP_activate;
cslip_hwtype.activate = CSLIP_activate;
slip6_hwtype.activate = SLIP6_activate;
cslip6_hwtype.activate = CSLIP6_activate;
adaptive_hwtype.activate = ADAPTIVE_activate;
#endif
#if HAVE_HWPPP
ppp_hwtype.activate = PPP_activate;
#endif
}
int activate_ld(const char *hwname, int fd)
{
struct hwtype *hw;
hw = get_hwtype(hwname);
if (!hw) {
fprintf(stderr,NLS_CATGETS(catfd, libSet, lib_act_no_support, "Hardware type `%s' not supported.\n"),hwname);
return(E_NOSUPP);
}
if (!hw->activate) {
fprintf(stderr,NLS_CATGETS(catfd, libSet, lib_type_no_act, "Cannot change line discipline to `%s'.\n"),hw->name);
return(E_OPTERR);
}
return(hw->activate(fd));
}
/*
* lib/af.c This file contains the top-level part of the protocol
* support functions module for the NET-2 base distribution.
*
* Version: lib/af.c 1.13 (1996-02-21)
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include "config.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
int flag_unx = 0;
int flag_ipx = 0;
int flag_ax25 = 0;
int flag_ddp = 0;
int flag_netrom = 0;
int flag_inet = 0;
int flag_inet6 = 0;
struct aftrans_t {
char *alias;
char *name;
int *flag;
} aftrans[]={
{"ax25", "ax25", &flag_ax25},
{"ip", "inet", &flag_inet},
{"ip6", "inet6", &flag_inet6},
{"ipx", "ipx", &flag_ipx},
{"appletalk", "ddp", &flag_ddp},
{"netrom", "netrom", &flag_netrom},
{"inet", "inet", &flag_inet},
{"inet6", "inet6", &flag_inet6},
{"ddp", "ddp", &flag_ddp},
{"unix", "unix", &flag_unx},
{"tcpip", "inet", &flag_inet},
{0, 0, 0}
};
char afname[256]="";
extern struct aftype unspec_aftype;
extern struct aftype unix_aftype;
extern struct aftype inet_aftype;
extern struct aftype inet6_aftype;
extern struct aftype ax25_aftype;
extern struct aftype netrom_aftype;
extern struct aftype ipx_aftype;
extern struct aftype ddp_aftype;
static short sVafinit = 0;
static struct aftype *aftypes[] = {
#if HAVE_AFUNIX
&unix_aftype,
#endif
#if HAVE_AFINET
&inet_aftype,
#endif
#if HAVE_AFINET6
&inet6_aftype,
#endif
#if HAVE_AFAX25
&ax25_aftype,
#endif
#if HAVE_AFNETROM
&netrom_aftype,
#endif
#if HAVE_AFIPX
&ipx_aftype,
#endif
#if HAVE_AFATALK
&ddp_aftype,
#endif
&unspec_aftype,
NULL
};
void afinit ()
{
unspec_aftype.title = NLS_CATSAVE (catfd, unixSet, unix_unspec, "UNSPEC");
#if HAVE_AFINET
unix_aftype.title = NLS_CATSAVE (catfd, unixSet, unix_unix, "UNIX Domain");
#endif
#if HAVE_AFINET
inet_aftype.title = NLS_CATSAVE (catfd, inetSet, inet_darpa, "DARPA Internet");
#endif
#if HAVE_AFINET6
inet6_aftype.title = NLS_CATSAVE (catfd, inetSet, inet_darpa, "IPv6");
#endif
#if HAVE_AFAX25
ax25_aftype.title = NLS_CATSAVE (catfd, ax25Set, ax25_ax25, "AMPR AX.25");
#endif
#if HAVE_AFNETROM
netrom_aftype.title = NLS_CATSAVE (catfd, netromSet, netrom_netrom, "AMPR NET/ROM");
#endif
#if HAVE_AFIPX
ipx_aftype.title = NLS_CATSAVE (catfd, ipxSet, ipx_ipx, "IPX");
#endif
#if HAVE_AFATALK
ddp_aftype.title = NLS_CATSAVE (catfd, ddpSet, ddp_ddp, "Appletalk DDP");
#endif
sVafinit = 1;
}
/* set the default AF list from the program name or a constant value */
void
aftrans_def(char *tool, char *argv0, char *dflt)
{
char *tmp;
char *buf;
strcpy(afname, dflt);
if (!(tmp = strrchr(argv0, '/')))
tmp = argv0; /* no slash?! */
else
tmp++;
if (!(buf = strdup(tmp)))
return;
if (strlen(tool) >= strlen(tmp)) {
free(buf);
return;
}
tmp = buf+(strlen(tmp)-strlen(tool));
if (strcmp(tmp, tool)!=0) {
free(buf);
return;
}
*tmp = '\0';
if ((tmp = strchr(buf,'_')))
*tmp = '\0';
afname[0]='\0';
if (aftrans_opt(buf))
strcpy(afname, buf);
free(buf);
}
/* Check our protocol family table for this family. */
struct aftype *
get_aftype(const char *name)
{
struct aftype **afp;
if (!sVafinit)
afinit ();
afp = aftypes;
while (*afp != NULL) {
if (!strcmp((*afp)->name, name)) return(*afp);
afp++;
}
if (index(name,','))
fprintf(stderr,NLS_CATGETS(catfd, libSet, lib_toomuch, "Please don't supply more than one address family.\n"));
return(NULL);
}
/* Check our protocol family table for this family. */
struct aftype *
get_afntype(int af)
{
struct aftype **afp;
if (!sVafinit)
afinit ();
afp = aftypes;
while (*afp != NULL) {
if ((*afp)->af == af) return(*afp);
afp++;
}
return(NULL);
}
int aftrans_opt(const char *arg)
{
struct aftrans_t *paft;
char *tmp1, *tmp2;
char buf[256];
strncpy(buf,arg,sizeof(buf));
buf[sizeof(buf)-1]='\0';
tmp1=buf;
while(tmp1) {
tmp2=index(tmp1,',');
if (tmp2)
*(tmp2++)='\0';
paft=aftrans;
for(paft=aftrans;paft->alias;paft++) {
if (strcmp(tmp1,paft->alias))
continue;
if (strlen(paft->name)+strlen(afname)+1 >= sizeof(afname)) {
fprintf(stderr,NLS_CATGETS(catfd, libSet, lib_toomuch_af, "Too much address family arguments.\n"));
return(0);
}
if (paft->flag)
(*paft->flag)++;
if (afname[0])
strcat(afname,",");
strcat(afname,paft->name);
break;
}
if (!paft->alias) {
fprintf(stderr,NLS_CATGETS(catfd, libSet, lib_unknown_af, "Unknown address family `%s'.\n"),tmp1);
return(1);
}
tmp1=tmp2;
}
return(0);
}
/*
* lib/arcnet.c This file contains an implementation of the "ARCnet"
* support functions for the NET-2 base distribution.
*
* Version: @(#)arcnet.c 1.10 10/07/93
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include "config.h"
#if HAVE_HWARC
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if_arp.h>
#include <linux/if_ether.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
extern struct hwtype arcnet_hwtype;
/* Display an ARCnet address in readable format. */
static char *
pr_arcnet(unsigned char *ptr)
{
static char buff[64];
sprintf(buff, "%02X",(ptr[0] & 0377));
return(buff);
}
/* Display an ARCnet socket address. */
static char *
pr_sarcnet(struct sockaddr *sap)
{
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, arcnetSet, arcnet_none, "[NONE SET]", buf, 64));
return(pr_arcnet(sap->sa_data));
}
/* Input an ARCnet address and convert to binary. */
static int
in_arcnet(char *bufp, struct sockaddr *sap)
{
unsigned char *ptr;
char c, *orig;
int i, val;
sap->sa_family = arcnet_hwtype.type;
ptr = sap->sa_data;
i = 0;
orig = bufp;
while((*bufp != '\0') && (i < 1)) {
val = 0;
c = *bufp++;
if (isdigit(c)) val = c - '0';
else if (c >= 'a' && c <= 'f') val = c - 'a' + 10;
else if (c >= 'A' && c <= 'F') val = c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, arcnetSet, arcnet_debug1,
"in_arcnet(%s): invalid arcnet address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
}
val <<= 4;
c = *bufp++;
if (isdigit(c)) val |= c - '0';
else if (c >= 'a' && c <= 'f') val |= c - 'a' + 10;
else if (c >= 'A' && c <= 'F') val |= c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, arcnetSet, arcnet_debug2,
"in_arcnet(%s): invalid arcnet address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
}
*ptr++ = (unsigned char) (val & 0377);
i++;
/* We might get a semicolon here - not required. */
if (*bufp == ':') {
if (i == ETH_ALEN) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, arcnetSet, arcnet_debug3,
"in_arcnet(%s): trailing : ignored!\n"),
orig)
#endif
; /* nothing */
}
bufp++;
}
}
/* That's it. Any trailing junk? */
if ((i == ETH_ALEN) && (*bufp != '\0')) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, arcnetSet, arcnet_debug4, "in_arcnet(%s): trailing junk!\n"), orig);
errno = EINVAL;
return(-1);
#endif
}
#ifdef DEBUG
fprintf(stderr, "in_arcnet(%s): %s\n", orig, pr_arcnet(sap->sa_data));
#endif
return(0);
}
struct hwtype arcnet_hwtype = {
"arcnet", NULL, /*"2.5Mbps ARCnet",*/ ARPHRD_ARCNET, 1,
pr_arcnet, pr_sarcnet, in_arcnet, NULL
};
#endif /* HAVE_HWARC */
/*
* lib/ax25.c This file contains an implementation of the "AX.25"
* support functions for the NET-2 base distribution.
*
* Version: @(#)ax25.c 1.20 12/16/93
*
* NOTE: I will redo this module as soon as I got the libax25.a
* library sorted out. This library contains some useful
* and often used address conversion functions, database
* lookup stuff, and more of the like.
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include "config.h"
#if HAVE_AFAX25 || HAVE_HWAX25
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <linux/ax25.h>
#include <net/if_arp.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
static char AX25_errmsg[128];
extern struct aftype ax25_aftype;
static char *
AX25_print(unsigned char *ptr)
{
static char buff[8];
int i;
for (i = 0; i < 6; i++) {
buff[i] = ((ptr[i] & 0377) >> 1);
if (buff[i] == ' ') buff[i] = '\0';
}
buff[6] = '\0';
i = ((ptr[6] & 0x1E) >> 1);
if (i != 0) sprintf(&buff[strlen(buff)], "-%d", i);
return(buff);
}
/* Display an AX.25 socket address. */
static char *
AX25_sprint(struct sockaddr *sap, int numeric)
{
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, ax25Set, ax25_none, "[NONE SET]", buf, 64));
return(AX25_print(((struct sockaddr_ax25 *)sap)->sax25_call.ax25_call));
}
static int
AX25_input(int type, char *bufp, struct sockaddr *sap)
{
unsigned char *ptr;
char *orig, c;
int i;
sap->sa_family = ax25_aftype.af;
ptr = ((struct sockaddr_ax25 *)sap)->sax25_call.ax25_call;
/* First, scan and convert the basic callsign. */
orig = bufp;
i = 0;
while((*bufp != '\0') && (*bufp != '-') && (i < 6)) {
c = *bufp++;
if (islower(c)) c = toupper(c);
if (! (isupper(c) || isdigit(c))) {
strcpy(AX25_errmsg, NLS_CATGETS (catfd, ax25Set, ax25_debug1, "Invalid callsign"));
#ifdef DEBUG
fprintf(stderr, "ax25_input(%s): %s !\n", AX25_errmsg, orig);
#endif
errno = EINVAL;
return(-1);
}
*ptr++ = (unsigned char) ((c << 1) & 0xFE);
i++;
}
/* Callsign too long? */
if ((i == 6) && (*bufp != '-') && (*bufp != '\0')) {
strcpy(AX25_errmsg, NLS_CATGETS (catfd, ax25Set, ax25_debug2, "Callsign too long"));
#ifdef DEBUG
fprintf(stderr, "ax25_input(%s): %s !\n", AX25_errmsg, orig);
#endif
errno = E2BIG;
return(-1);
}
/* Nope, fill out the address bytes with blanks. */
while (i++ < sizeof(ax25_address)-1) {
*ptr++ = (unsigned char) ((' ' << 1) & 0xFE);
}
/* See if we need to add an SSID field. */
if (*bufp == '-') {
i = atoi(++bufp);
*ptr = (unsigned char) ((i << 1) & 0xFE);
} else {
*ptr = (unsigned char) '\0';
}
/* All done. */
#ifdef DEBUG
fprintf(stderr, "ax25_input(%s): ", orig);
for (i = 0; i < sizeof(ax25_address); i++)
fprintf(stderr, "%02X ", sap->sa_data[i] & 0377);
fprintf(stderr, "\n");
#endif
return(0);
}
/* Display an error message. */
static void
AX25_herror(char *text)
{
if (text == NULL) fprintf(stderr, "%s\n", AX25_errmsg);
else fprintf(stderr, "%s: %s\n", text, AX25_errmsg);
}
static char *
AX25_hprint(struct sockaddr *sap)
{
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, ax25Set, ax25_none, "[NONE SET]", buf, 64));
return(AX25_print(((struct sockaddr_ax25 *)sap)->sax25_call.ax25_call));
}
static int
AX25_hinput(char *bufp, struct sockaddr *sap)
{
if (AX25_input(0, bufp, sap) < 0) return(-1);
sap->sa_family = ARPHRD_AX25;
return(0);
}
#if 0
/* Set the line discipline of a terminal line. */
static int
KISS_set_disc(int fd, int disc)
{
if (ioctl(fd, TIOCSETD, &disc) < 0) {
fprintf(stderr, "KISS_set_disc(%d): %s\n", disc, strerror(errno));
return(-errno);
}
return(0);
}
/* Start the KISS encapsulation on the file descriptor. */
static int
KISS_init(int fd)
{
if (KISS_set_disc(fd, N_SLIP) < 0) return(-1);
if (ioctl(fd, SIOCSIFENCAP, 4) <0) return(-1);
return(0);
}
#endif
struct hwtype ax25_hwtype = {
"ax25", NULL, /*"AMPR AX.25",*/ ARPHRD_AX25, 7,
AX25_print, AX25_hprint, AX25_hinput, NULL
};
struct aftype ax25_aftype = {
"ax25", NULL, /*"AMPR AX.25",*/ AF_AX25, 7,
AX25_print, AX25_sprint, AX25_input, AX25_herror,
NULL
};
#endif /* HAVE_xxAX25 */
/*
* lib/ax25_gr.c This file contains an implementation of the "AX.25"
* route print support functions.
*
* Version: lib/ax25_gr.c 1.01 (1996-02-15)
*
* Author: Bernd Eckenfels, <ecki@lina.inka.de>
* Copyright 1999 Bernd Eckenfels, Germany
* base on Code from Jonathan Naylor <jsn@Cs.Nott.AC.UK>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include "config.h"
#if HAVE_AFAX25
#if 0
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <linux/ax25.h>
#include <linux/if_arp.h> /* ARPHRD_AX25 */
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <termios.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
int AX25_rprint(int options)
{
FILE *f=fopen(_PATH_PROCNET_AX25_ROUTE, "r");
char buffer[256];
int use;
if(f==NULL)
{
printf(NLS_CATGETS(catfd, netstatSet, netstat_noax25, "AX.25 not configured in this system.\n")); /* xxx */
return 1;
}
printf(NLS_CATGETS(catfd, netstatSet, netstat_ax25, "Kernel AX.25 routing table\n")); /* xxx */
printf(NLS_CATGETS(catfd, netstatSet, netstat_header_ax25, "Destination Iface Use\n")); /* xxx */
fgets(buffer,256,f);
while(fgets(buffer,256,f))
{
buffer[9]=0;
buffer[14]=0;
use=atoi(buffer+15);
printf("%-9s %-5s %5d\n",
buffer,buffer+10,use);
}
fclose(f);
return 0;
}
#endif /* HAVE_AFAX25 */
/*
* DDP protocol output functions.
* [Not yet input]
*
* Alan Cox <Alan.Cox@linux.org>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include "config.h"
#if HAVE_AFATALK
#include <asm/types.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/atalk.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
/* Display a ddp domain address. */
static char *
ddp_print(unsigned char *ptr)
{
static char buff[64];
struct sockaddr_at *sat=(struct sockaddr_at *)(ptr-2);
sprintf(buff,"%d/%d",(int) ntohs(sat->sat_addr.s_net), (int)sat->sat_addr.s_node);
return(buff);
}
/* Display a ddp domain address. */
static char *
ddp_sprint(struct sockaddr *sap, int numeric)
{
static char buf[64];
if (sap->sa_family != AF_APPLETALK)
return(NLS_CATBUFF (catfd, ddpSet, ddp_none, "[NONE SET]", buf, 64));
return(ddp_print(sap->sa_data));
}
struct aftype ddp_aftype = {
"ddp", NULL, /*"Appletalk DDP",*/ AF_APPLETALK, 0,
ddp_print, ddp_sprint, NULL, NULL,
NULL/*DDP_rprint*/
};
#endif
#include "config.h"
#if HAVE_AFATALK
#include <asm/types.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/atalk.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
int DDP_rprint(int options)
{
fprintf(stderr,NLS_CATGETS(catfd, ddpSet, ddp_notyet,
"Routing table for `ddp' not yet supported.\n"));
return(1);
}
#endif
/*
* lib/ether.c This file contains an implementation of the "Ethernet"
* support functions for the NET-2 base distribution.
*
* Version: @(#)ether.c 1.10 10/07/93
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include "config.h"
#if HAVE_HWETHER
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if_arp.h>
#include <linux/if_ether.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
extern struct hwtype ether_hwtype;
/* Display an Ethernet address in readable format. */
static char *
pr_ether(unsigned char *ptr)
{
static char buff[64];
sprintf(buff, "%02X:%02X:%02X:%02X:%02X:%02X",
(ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377),
(ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377)
);
return(buff);
}
/* Display an Ethernet socket address. */
static char *
pr_sether(struct sockaddr *sap)
{
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, etherSet, ether_none, "[NONE SET]", buf, 64));
return(pr_ether(sap->sa_data));
}
/* Input an Ethernet address and convert to binary. */
static int
in_ether(char *bufp, struct sockaddr *sap)
{
unsigned char *ptr;
char c, *orig;
int i, val;
sap->sa_family = ether_hwtype.type;
ptr = sap->sa_data;
i = 0;
orig = bufp;
while((*bufp != '\0') && (i < ETH_ALEN)) {
val = 0;
c = *bufp++;
if (isdigit(c)) val = c - '0';
else if (c >= 'a' && c <= 'f') val = c - 'a' + 10;
else if (c >= 'A' && c <= 'F') val = c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, etherSet, ether_debug1,
"in_ether(%s): invalid ether address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
}
val <<= 4;
c = *bufp++;
if (isdigit(c)) val |= c - '0';
else if (c >= 'a' && c <= 'f') val |= c - 'a' + 10;
else if (c >= 'A' && c <= 'F') val |= c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, etherSet, ether_debug2,
"in_ether(%s): invalid ether address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
}
*ptr++ = (unsigned char) (val & 0377);
i++;
/* We might get a semicolon here - not required. */
if (*bufp == ':') {
if (i == ETH_ALEN) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, etherSet, ether_debug3,
"in_ether(%s): trailing : ignored!\n"),
orig)
#endif
; /* nothing */
}
bufp++;
}
}
/* That's it. Any trailing junk? */
if ((i == ETH_ALEN) && (*bufp != '\0')) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, etherSet, ether_debug4, "in_ether(%s): trailing junk!\n"), orig);
errno = EINVAL;
return(-1);
#endif
}
#ifdef DEBUG
fprintf(stderr, "in_ether(%s): %s\n", orig, pr_ether(sap->sa_data));
#endif
return(0);
}
struct hwtype ether_hwtype = {
"ether", NULL, /*"10Mbps Ethernet",*/ ARPHRD_ETHER, ETH_ALEN,
pr_ether, pr_sether, in_ether, NULL
};
#endif /* HAVE_HWETHER */
/*
* lib/frame.c This file contains the Frame Relay support.
*
* Version: lib/frame.c 0.01 (1996-03-23)
*
* Maintainer: Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
*
* Author: Mike McLagan <mike.mclagan@linux.org>
*
* Changes:
*
*962303 {0.01} Mike McLagan : creation
*960413 {0.02} Bernd Eckenfels : included in net-lib
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include "config.h"
#if HAVE_HWFR
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if_arp.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
char *pr_dlci(unsigned char *ptr)
{
static char buf[12];
sprintf(buf, "%i", *(short *)ptr);
return(buf);
}
struct hwtype dlci_hwtype = {
"dlci", NULL, /*"Frame Relay DLCI",*/ ARPHRD_DLCI, 3,
pr_dlci, NULL, NULL, NULL
};
struct hwtype frad_hwtype = {
"frad", NULL, /*"Frame Relay Access Device",*/ ARPHRD_FRAD, 0,
NULL, NULL, NULL, NULL
};
#endif /* HAVE_HWFR */
/*
* lib/getargs.c General argument parser.
*
* Version: @(#)getargs.c 4.0.1 04/05/94
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993,1994 MicroWalt Corporation
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include "config.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
/* Split the input string into multiple fields. */
int
getargs(char *string, char *arguments[])
{
char temp[1024];
char *sp, *ptr;
int i, argc;
char want;
/*
* Copy the string into a buffer. We may have to modify
* the original string because of all the quoting...
*/
sp = string; i = 0;
strcpy(temp, string);
ptr = temp;
/*
* Look for delimiters ("); if present whatever
* they enclose will be considered one argument.
*/
while (*ptr != '\0' && i < 32) {
/* Ignore leading whitespace on input string. */
while (*ptr == ' ' || *ptr == '\t') ptr++;
/* Set string pointer. */
arguments[i++] = sp;
/* Check for any delimiters. */
if (*ptr == '"' || *ptr == '\'') {
/*
* Copy the string up to any whitespace OR the next
* delimiter. If the delimiter was escaped, skip it
* as it if was not there.
*/
want = *ptr++;
while(*ptr != '\0') {
if (*ptr == want && *(ptr - 1) != '\\') {
ptr++;
break;
}
*sp++ = *ptr++;
}
} else {
/* Just copy the string up to any whitespace. */
while(*ptr != '\0' && *ptr != ' ' && *ptr != '\t')
*sp++ = *ptr++;
}
*sp++ = '\0';
/* Skip trailing whitespace. */
if (*ptr != '\0') {
while(*ptr == ' ' || *ptr == '\t') ptr++;
}
}
argc = i;
while (i < 32) arguments[i++] = (char *)NULL;
return(argc);
}
/*
* lib/getroute.c This file contains a small interface function to
* use the AF specific print routine for the routing
* table.
*
* NET-LIB A collection of functions used from the base set of the
* NET-3 Networking Distribution for the LINUX operating
* system. (net-tools, net-drivers)
*
* Version: lib/getroute.c 1.03 (1996-04-13)
*
* Author: Bernd 'eckes' Eckenfels <net-tools@lina.inka.de>
* Copyright 1999 Bernd Eckenfels, Germany
*
* Modifications:
*
*951020 {0.10} Bernd Eckenfels: creation
*960202 {0.90} Bernd Eckenfels: rewrite to use getaftype.
*960204 {0.91} Bernd Eckenfels: takes constant list of AFs
*960206 {1.01} Bernd Eckenfels: route_init will enable routing
* support in the AF handlers
*960221 {1.02} Bernd Eckenfels: renamed from route_info to getroute.c
*960413 {1.03} Bernd Eckenfels: new RTACTION support
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include <stdio.h>
#include <string.h>
#include "net-support.h"
#include "pathnames.h"
#include "version.h"
#include "config.h"
#include "net-locale.h"
extern struct aftype unspec_aftype;
extern struct aftype unix_aftype;
extern struct aftype inet_aftype;
extern struct aftype inet6_aftype;
extern struct aftype ax25_aftype;
extern struct aftype netrom_aftype;
extern struct aftype ipx_aftype;
extern struct aftype ddp_aftype;
void
getroute_init(void)
{
#if HAVE_AFINET
inet_aftype.rprint = INET_rprint;
#endif
#if HAVE_AFINET6
inet6_aftype.rprint = INET6_rprint;
#endif
#if HAVE_AFNETROM
netrom_aftype.rprint = NETROM_rprint;
#endif
#if HAVE_AFAX25
ax25_aftype.rprint = AX25_rprint;
#endif
#if HAVE_AFIPX
ipx_aftype.rprint = IPX_rprint;
#endif
#if HAVE_AFATALK
ddp_aftype.rprint = DDP_rprint;
#endif
}
int
route_info(const char *afname, int options)
{
struct aftype *ap;
char *tmp1,*tmp2;
int found=E_NOTFOUND,rc;
char buf[256];
strncpy(buf,afname,sizeof(buf));
buf[sizeof(buf)-1]='\0';
tmp1=buf;
while(tmp1) {
ap=NULL;
if ((tmp2=index(tmp1,',')))
*tmp2++='\0';
if (!tmp1[0]) {
tmp1=tmp2;
continue;
}
ap = get_aftype(tmp1);
if (!ap) {
fprintf(stderr,NLS_CATGETS(catfd, netstatSet, netstat_route_no_support, "Address family `%s' not supported.\n"),tmp1);
return(E_OPTERR);
}
tmp1=tmp2;
if (!ap->rprint) {
fprintf(stderr,NLS_CATGETS(catfd, netstatSet, netstat_type_no_route, "No routing for address family `%s'.\n"),ap->name);
return(E_OPTERR);
}
found = 0;
if ((rc = ap->rprint(options)))
return(rc);
}
return(found);
}
/*
* lib/hw.c This file contains the top-level part of the hardware
* support functions module for the NET-2 base distribution.
*
* Version: lib/hw.c 1.13 (1996-04-13)
*
* Maintainer: Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
* Changes:
*960413 {1.13} Mike Mclagan : DLCI/FRAD support
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include "config.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
extern struct hwtype unspec_hwtype;
extern struct hwtype loop_hwtype;
extern struct hwtype slip_hwtype;
extern struct hwtype cslip_hwtype;
extern struct hwtype slip6_hwtype;
extern struct hwtype cslip6_hwtype;
extern struct hwtype adaptive_hwtype;
extern struct hwtype ether_hwtype;
extern struct hwtype tr_hwtype;
extern struct hwtype ax25_hwtype;
extern struct hwtype netrom_hwtype;
extern struct hwtype tunnel_hwtype;
extern struct hwtype ppp_hwtype;
extern struct hwtype arcnet_hwtype;
extern struct hwtype dlci_hwtype;
extern struct hwtype frad_hwtype;
extern struct hwtype sit_hwtype;
static struct hwtype *hwtypes[] = {
&loop_hwtype,
#if HAVE_HWSLIP
&slip_hwtype,
&cslip_hwtype,
&slip6_hwtype,
&cslip6_hwtype,
&adaptive_hwtype,
#endif
#if HAVE_HWETHER
&ether_hwtype,
#endif
#if HAVE_HWTR
&tr_hwtype,
#endif
#if HAVE_HWAX25
&ax25_hwtype,
#endif
#if HAVE_HWNETROM
&netrom_hwtype,
#endif
#if HAVE_HWTUNNEL
&tunnel_hwtype,
#endif
#if HAVE_HWPPP
&ppp_hwtype,
#endif
#if HAVE_HWARC
&arcnet_hwtype,
#endif
#if HAVE_HWFR
&dlci_hwtype,
&frad_hwtype,
#endif
#if HAVE_HWSIT
&sit_hwtype,
#endif
&unspec_hwtype,
NULL
};
static short sVhwinit = 0;
void hwinit ()
{
loop_hwtype.title = NLS_CATSAVE (catfd, loopbackSet, loopback_loop, "Local Loopback");
#if HAVE_HWSLIP
slip_hwtype.title = NLS_CATSAVE (catfd, slipSet, slip_slip, "Serial Line IP");
cslip_hwtype.title = NLS_CATSAVE (catfd, slipSet, slip_cslip, "VJ Serial Line IP");
slip6_hwtype.title = NLS_CATSAVE (catfd, slipSet, slip_slip6, "6-bit Serial Line IP");
cslip6_hwtype.title = NLS_CATSAVE (catfd, slipSet, slip_cslip6, "VJ 6-bit Serial Line IP");
adaptive_hwtype.title = NLS_CATSAVE (catfd, slipSet, slip_adaptive, "Adaptive Serial Line IP");
#endif
unspec_hwtype.title = NLS_CATSAVE (catfd, loopbackSet, loopback_unspec, "UNSPEC");
#if HAVE_HWETHER
ether_hwtype.title = NLS_CATSAVE (catfd, etherSet, ether_ether, "Ethernet");
#endif
#if HAVE_HWAX25
ax25_hwtype.title = NLS_CATSAVE (catfd, ax25Set, ax25_hw, "AMPR AX.25");
#endif
#if HAVE_HWNETROM
netrom_hwtype.title = NLS_CATSAVE (catfd, netromSet, netrom_hw, "AMPR NET/ROM");
#endif
#if HAVE_HWTUNNEL
tunnel_hwtype.title = NLS_CATSAVE (catfd, tunnelSet, tunnel_hw, "IPIP Tunnel");
#endif
#if HAVE_HWPPP
ppp_hwtype.title = NLS_CATSAVE (catfd, pppSet, ppp_ppp, "Point-to-Point Protocol");
#endif
#if HAVE_HWARC
arcnet_hwtype.title = NLS_CATSAVE (catfd, arcnetSet, arcnet_arcnet, "1.5Mbps ARCnet");
#endif
#if HAVE_HWFR
dlci_hwtype.title = NLS_CATSAVE(catfd, dlciSet, dlci_hw, "Frame Relay DLCI");
frad_hwtype.title = NLS_CATSAVE(catfd, fradSet, frad_hw, "Frame Relay Access Device");
#endif
#if HAVE_HWSIT
sit_hwtype.title = NLS_CATSAVE(catfd, sitSet, sit_hw, "IPv6-in-IPv4");
#endif
sVhwinit = 1;
}
/* Check our hardware type table for this type. */
struct hwtype *
get_hwtype(const char *name)
{
struct hwtype **hwp;
if (!sVhwinit)
hwinit();
hwp = hwtypes;
while (*hwp != NULL) {
if (!strcmp((*hwp)->name, name)) return(*hwp);
hwp++;
}
return(NULL);
}
/* Check our hardware type table for this type. */
struct hwtype *
get_hwntype(int type)
{
struct hwtype **hwp;
if (!sVhwinit)
hwinit();
hwp = hwtypes;
while (*hwp != NULL) {
if ((*hwp)->type == type) return(*hwp);
hwp++;
}
return(NULL);
}
This diff is collapsed.
/*
* lib/inet6.c This file contains an implementation of the "INET6"
* support functions for the net-tools.
* (most of it copied from lib/inet.c 1.26).
*
* Version: lib/inet6.c 0.01 1996-08-08
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
* Modified:
*960808 {0.01} Frank Strauss : adapted for IPv6 support
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*/
#include "config.h"
#if HAVE_AFINET6
#include <asm/types.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <resolv.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
extern int h_errno; /* some netdb.h versions don't export this */
static int
INET6_resolve(char *name, struct sockaddr_in6 *sin6)
{
struct addrinfo req, *ai;
int s;
req.ai_family = AF_INET6;
if ((s = getaddrinfo(name, NULL, &req, &ai))) {
fprintf(stderr, "getaddrinfo: %s: %s\n", name, gai_strerror(s));
return -1;
}
memcpy(sin6, ai->ai_addr, sizeof(struct sockaddr_in6));
freeaddrinfo(ai);
return(0);
}
static int
INET6_rresolve(char *name, struct sockaddr_in6 *sin6, int numeric)
{
int s;
/* Grmpf. -FvK */
if (sin6->sin6_family != AF_INET6) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, inetSet, inet_debug1, "rresolve: unsupport address family %d !\n"),
sin6->sin6_family);
#endif
errno = EAFNOSUPPORT;
return(-1);
}
if (numeric & 0x7FFF) {
inet_ntop(AF_INET6, &sin6->sin6_addr, name, 80);
return(0);
}
if ((s = getnameinfo((struct sockaddr *)sin6, sizeof(struct sockaddr_in6),
name, 255 /* !! */, NULL, 0, 0))) {
fprintf(stderr, "getnameinfo: %s\n", gai_strerror(s));
return -1;
}
return(0);
}
static void
INET6_reserror(char *text)
{
herror(text);
}
/* Display an Internet socket address. */
static char *
INET6_print(unsigned char *ptr)
{
static char name[80];
inet_ntop(AF_INET6, (struct in6_addr *)ptr, name, 80);
return name;
}
/* Display an Internet socket address. */
/* dirty! struct sockaddr usually doesn't suffer for inet6 addresses, fst. */
static char *
INET6_sprint(struct sockaddr *sap, int numeric)
{
static char buff[128];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, inetSet, inet_none, "[NONE SET]", buff, 128));
if (INET6_rresolve(buff, (struct sockaddr_in6 *) sap, numeric) != 0)
return(NULL);
return(buff);
}
static int
INET6_getsock(char *bufp, struct sockaddr *sap)
{
struct sockaddr_in6 *sin6;
sin6 = (struct sockaddr_in6 *) sap;
sin6->sin6_family = AF_INET6;
sin6->sin6_port = 0;
if (inet_pton(AF_INET6, bufp, sin6->sin6_addr.s6_addr) <= 0)
return(-1);
return 16; /* ?;) */
}
static int
INET6_input(int type, char *bufp, struct sockaddr *sap)
{
switch(type) {
case 1:
return(INET6_getsock(bufp, sap));
default:
return(INET6_resolve(bufp, (struct sockaddr_in6 *) sap));
}
}
struct aftype inet6_aftype = {
"inet6", NULL, /*"IPv6",*/ AF_INET6, sizeof(struct in6_addr),
INET6_print, INET6_sprint, INET6_input, INET6_reserror,
INET6_rprint, INET6_rinput
};
#endif /* HAVE_AFINET6 */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#include "config.h"
#if HAVE_AFIPX
#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <sys/ioctl.h>
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <resolv.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "net-features.h"
extern struct aftype ipx_aftype;
/* static int skfd = -1; */
/*
static int usage(void)
{
fprintf(stderr,"IPX usage\n");
return(E_USAGE);
}
*/
int IPX_rinput(int action, int ext, char **args)
{
fprintf(stderr,"IPX: this needs to be written\n");
return(0);
}
#endif /* HAVE_AFIPX */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment