Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a6f426f6
Commit
a6f426f6
authored
May 06, 2003
by
Chas Williams
Committed by
David S. Miller
May 06, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: Forward port br2864 to 2.5.x
parent
15f4cd09
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
939 additions
and
1 deletion
+939
-1
include/linux/atmbr2684.h
include/linux/atmbr2684.h
+101
-0
include/linux/atmdev.h
include/linux/atmdev.h
+3
-1
net/Kconfig
net/Kconfig
+17
-0
net/atm/Makefile
net/atm/Makefile
+1
-0
net/atm/br2684.c
net/atm/br2684.c
+803
-0
net/atm/common.c
net/atm/common.c
+14
-0
No files found.
include/linux/atmbr2684.h
0 → 100644
View file @
a6f426f6
#ifndef _LINUX_ATMBR2684_H
#define _LINUX_ATMBR2684_H
#include <linux/atm.h>
#include <linux/if.h>
/* For IFNAMSIZ */
/*
* Type of media we're bridging (ethernet, token ring, etc) Currently only
* ethernet is supported
*/
#define BR2684_MEDIA_ETHERNET (0)
/* 802.3 */
#define BR2684_MEDIA_802_4 (1)
/* 802.4 */
#define BR2684_MEDIA_TR (2)
/* 802.5 - token ring */
#define BR2684_MEDIA_FDDI (3)
#define BR2684_MEDIA_802_6 (4)
/* 802.6 */
/*
* Is there FCS inbound on this VC? This currently isn't supported.
*/
#define BR2684_FCSIN_NO (0)
#define BR2684_FCSIN_IGNORE (1)
#define BR2684_FCSIN_VERIFY (2)
/*
* Is there FCS outbound on this VC? This currently isn't supported.
*/
#define BR2684_FCSOUT_NO (0)
#define BR2684_FCSOUT_SENDZERO (1)
#define BR2684_FCSOUT_GENERATE (2)
/*
* Does this VC include LLC encapsulation?
*/
#define BR2684_ENCAPS_VC (0)
/* VC-mux */
#define BR2684_ENCAPS_LLC (1)
#define BR2684_ENCAPS_AUTODETECT (2)
/* Unsuported */
/*
* This is for the ATM_NEWBACKENDIF call - these are like socket families:
* the first element of the structure is the backend number and the rest
* is per-backend specific
*/
struct
atm_newif_br2684
{
atm_backend_t
backend_num
;
/* ATM_BACKEND_BR2684 */
int
media
;
/* BR2684_MEDIA_* */
char
ifname
[
IFNAMSIZ
];
int
mtu
;
};
/*
* This structure is used to specify a br2684 interface - either by a
* positive integer (returned by ATM_NEWBACKENDIF) or the interfaces name
*/
#define BR2684_FIND_BYNOTHING (0)
#define BR2684_FIND_BYNUM (1)
#define BR2684_FIND_BYIFNAME (2)
struct
br2684_if_spec
{
int
method
;
/* BR2684_FIND_* */
union
{
char
ifname
[
IFNAMSIZ
];
int
devnum
;
}
spec
;
};
/*
* This is for the ATM_SETBACKEND call - these are like socket families:
* the first element of the structure is the backend number and the rest
* is per-backend specific
*/
struct
atm_backend_br2684
{
atm_backend_t
backend_num
;
/* ATM_BACKEND_BR2684 */
struct
br2684_if_spec
ifspec
;
int
fcs_in
;
/* BR2684_FCSIN_* */
int
fcs_out
;
/* BR2684_FCSOUT_* */
int
fcs_auto
;
/* 1: fcs_{in,out} disabled if no FCS rx'ed */
int
encaps
;
/* BR2684_ENCAPS_* */
int
has_vpiid
;
/* 1: use vpn_id - Unsupported */
__u8
vpn_id
[
7
];
int
send_padding
;
/* unsupported */
int
min_size
;
/* we will pad smaller packets than this */
};
/*
* The BR2684_SETFILT ioctl is an experimental mechanism for folks
* terminating a large number of IP-only vcc's. When netfilter allows
* efficient per-if in/out filters, this support will be removed
*/
struct
br2684_filter
{
__u32
prefix
;
/* network byte order */
__u32
netmask
;
/* 0 = disable filter */
};
struct
br2684_filter_set
{
struct
br2684_if_spec
ifspec
;
struct
br2684_filter
filter
;
};
#define BR2684_SETFILT _IOW( 'a', ATMIOC_BACKEND + 0, \
struct br2684_filter_set)
#endif
/* _LINUX_ATMBR2684_H */
include/linux/atmdev.h
View file @
a6f426f6
...
...
@@ -96,6 +96,8 @@ struct atm_dev_stats {
/* enable or disable single-copy */
#define ATM_SETBACKEND _IOW('a',ATMIOC_SPECIAL+2,atm_backend_t)
/* set backend handler */
#define ATM_NEWBACKENDIF _IOW('a',ATMIOC_SPECIAL+3,atm_backend_t)
/* use backend to make new if */
/*
* These are backend handkers that can be set via the ATM_SETBACKEND call
...
...
@@ -104,7 +106,7 @@ struct atm_dev_stats {
*/
#define ATM_BACKEND_RAW 0
#define ATM_BACKEND_PPP 1
/* PPPoATM - RFC2364 */
#define ATM_BACKEND_BR
_
2684 2
/* Bridged RFC1483/2684 */
#define ATM_BACKEND_BR2684 2
/* Bridged RFC1483/2684 */
/* for ATM_GETTYPE */
#define ATM_ITFTYP_LEN 8
/* maximum length of interface type name */
...
...
net/Kconfig
View file @
a6f426f6
...
...
@@ -266,6 +266,23 @@ config ATM_MPOA
subnetwork boundaries. These shortcut connections bypass routers
enhancing overall network performance.
config ATM_BR2684
tristate "RFC1483/2684 Bridged protocols"
depends on ATM && INET
help
ATM PVCs can carry ethernet PDUs according to rfc2684 (formerly 1483)
This device will act like an ethernet from the kernels point of view,
with the traffic being carried by ATM PVCs (currently 1 PVC/device).
This is sometimes used over DSL lines. If in doubt, say N.
config ATM_BR2684_IPFILTER
bool "Per-VC IP filter kludge"
depends on ATM_BR2684
help
This is an experimental mechanism for users who need to terminating a
large number of IP-only vcc's. Do not enable this unless you are sure
you know what you are doing.
config VLAN_8021Q
tristate "802.1Q VLAN Support"
...
...
net/atm/Makefile
View file @
a6f426f6
...
...
@@ -7,6 +7,7 @@ mpoa-objs := mpc.o mpoa_caches.o mpoa_proc.o
obj-$(CONFIG_ATM)
:=
addr.o pvc.o signaling.o svc.o common.o atm_misc.o raw.o resources.o
obj-$(CONFIG_ATM_CLIP)
+=
clip.o ipcommon.o
obj-$(CONFIG_ATM_BR2684)
+=
br2684.o ipcommon.o
obj-$(CONFIG_NET_SCH_ATM)
+=
ipcommon.o
obj-$(CONFIG_PROC_FS)
+=
proc.o
...
...
net/atm/br2684.c
0 → 100644
View file @
a6f426f6
This diff is collapsed.
Click to expand it.
net/atm/common.c
View file @
a6f426f6
...
...
@@ -62,6 +62,13 @@ int (*pppoatm_ioctl_hook)(struct atm_vcc *, unsigned int, unsigned long);
EXPORT_SYMBOL
(
pppoatm_ioctl_hook
);
#endif
#if defined(CONFIG_ATM_BR2684) || defined(CONFIG_ATM_BR2684_MODULE)
int
(
*
br2684_ioctl_hook
)(
struct
atm_vcc
*
,
unsigned
int
,
unsigned
long
);
#ifdef CONFIG_ATM_BR2684_MODULE
EXPORT_SYMBOL
(
br2684_ioctl_hook
);
#endif
#endif
#include "resources.h"
/* atm_find_dev */
#include "common.h"
/* prototypes */
#include "protocols.h"
/* atm_init_<transport> */
...
...
@@ -784,6 +791,13 @@ int atm_ioctl(struct socket *sock,unsigned int cmd,unsigned long arg)
if
(
ret_val
!=
-
ENOIOCTLCMD
)
goto
done
;
}
#endif
#if defined(CONFIG_ATM_BR2684) || defined(CONFIG_ATM_BR2684_MODULE)
if
(
br2684_ioctl_hook
)
{
ret_val
=
br2684_ioctl_hook
(
vcc
,
cmd
,
arg
);
if
(
ret_val
!=
-
ENOIOCTLCMD
)
goto
done
;
}
#endif
if
(
get_user
(
buf
,
&
((
struct
atmif_sioc
*
)
arg
)
->
arg
))
{
ret_val
=
-
EFAULT
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment