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
nexedi
linux
Commits
f62f4705
Commit
f62f4705
authored
Oct 05, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/acme/sk_buff-2.6
into nuts.davemloft.net:/disk1/BK/acme-2.6
parents
2e21fda8
1b0fdcb4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
11 deletions
+27
-11
drivers/ieee1394/eth1394.c
drivers/ieee1394/eth1394.c
+1
-1
drivers/ieee1394/eth1394.h
drivers/ieee1394/eth1394.h
+7
-0
drivers/net/hamradio/bpqether.c
drivers/net/hamradio/bpqether.c
+1
-1
include/linux/if_tr.h
include/linux/if_tr.h
+9
-0
include/net/llc_pdu.h
include/net/llc_pdu.h
+5
-5
net/llc/llc_input.c
net/llc/llc_input.c
+1
-1
net/llc/llc_output.c
net/llc/llc_output.c
+3
-3
No files found.
drivers/ieee1394/eth1394.c
View file @
f62f4705
...
...
@@ -850,7 +850,7 @@ static inline u16 ether1394_type_trans(struct sk_buff *skb,
skb
->
mac
.
raw
=
skb
->
data
;
skb_pull
(
skb
,
ETH1394_HLEN
);
eth
=
(
struct
eth1394hdr
*
)
skb
->
mac
.
raw
;
eth
=
eth1394_hdr
(
skb
)
;
if
(
*
eth
->
h_dest
&
1
)
{
if
(
memcmp
(
eth
->
h_dest
,
dev
->
broadcast
,
dev
->
addr_len
)
==
0
)
...
...
drivers/ieee1394/eth1394.h
View file @
f62f4705
...
...
@@ -81,7 +81,14 @@ struct eth1394hdr {
unsigned
short
h_proto
;
/* packet type ID field */
}
__attribute__
((
packed
));
#ifdef __KERNEL__
#include <linux/skbuff.h>
static
inline
struct
eth1394hdr
*
eth1394_hdr
(
const
struct
sk_buff
*
skb
)
{
return
(
struct
eth1394hdr
*
)
skb
->
mac
.
raw
;
}
#endif
typedef
enum
{
ETH1394_GASP
,
ETH1394_WRREQ
}
eth1394_tx_type
;
...
...
drivers/net/hamradio/bpqether.c
View file @
f62f4705
...
...
@@ -193,7 +193,7 @@ static int bpq_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_ty
bpq
=
(
struct
bpqdev
*
)
dev
->
priv
;
eth
=
(
struct
ethhdr
*
)
skb
->
mac
.
raw
;
eth
=
eth_hdr
(
skb
)
;
if
(
!
(
bpq
->
acpt_addr
[
0
]
&
0x01
)
&&
memcmp
(
eth
->
h_source
,
bpq
->
acpt_addr
,
ETH_ALEN
))
...
...
include/linux/if_tr.h
View file @
f62f4705
...
...
@@ -48,6 +48,15 @@ struct trh_hdr {
__u16
rseg
[
8
];
/* routing registers */
};
#ifdef __KERNEL__
#include <linux/skbuff.h>
static
inline
struct
trh_hdr
*
tr_hdr
(
const
struct
sk_buff
*
skb
)
{
return
(
struct
trh_hdr
*
)
skb
->
mac
.
raw
;
}
#endif
/* This is an Token-Ring LLC structure */
struct
trllc
{
__u8
dsap
;
/* destination SAP */
...
...
include/net/llc_pdu.h
View file @
f62f4705
...
...
@@ -253,9 +253,9 @@ static inline void llc_pdu_header_init(struct sk_buff *skb, u8 type,
static
inline
void
llc_pdu_decode_sa
(
struct
sk_buff
*
skb
,
u8
*
sa
)
{
if
(
skb
->
protocol
==
ntohs
(
ETH_P_802_2
))
memcpy
(
sa
,
((
struct
ethhdr
*
)
skb
->
mac
.
raw
)
->
h_source
,
ETH_ALEN
);
memcpy
(
sa
,
eth_hdr
(
skb
)
->
h_source
,
ETH_ALEN
);
else
if
(
skb
->
protocol
==
ntohs
(
ETH_P_TR_802_2
))
memcpy
(
sa
,
((
struct
trh_hdr
*
)
skb
->
mac
.
raw
)
->
saddr
,
ETH_ALEN
);
memcpy
(
sa
,
tr_hdr
(
skb
)
->
saddr
,
ETH_ALEN
);
}
/**
...
...
@@ -268,9 +268,9 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa)
static
inline
void
llc_pdu_decode_da
(
struct
sk_buff
*
skb
,
u8
*
da
)
{
if
(
skb
->
protocol
==
ntohs
(
ETH_P_802_2
))
memcpy
(
da
,
((
struct
ethhdr
*
)
skb
->
mac
.
raw
)
->
h_dest
,
ETH_ALEN
);
memcpy
(
da
,
eth_hdr
(
skb
)
->
h_dest
,
ETH_ALEN
);
else
if
(
skb
->
protocol
==
ntohs
(
ETH_P_TR_802_2
))
memcpy
(
da
,
((
struct
trh_hdr
*
)
skb
->
mac
.
raw
)
->
daddr
,
ETH_ALEN
);
memcpy
(
da
,
tr_hdr
(
skb
)
->
daddr
,
ETH_ALEN
);
}
/**
...
...
@@ -347,7 +347,7 @@ static inline void llc_pdu_init_as_test_rsp(struct sk_buff *skb,
struct
llc_pdu_un
*
ev_pdu
=
llc_pdu_un_hdr
(
ev_skb
);
int
dsize
;
dsize
=
ntohs
(
((
struct
ethhdr
*
)
ev_skb
->
mac
.
raw
)
->
h_proto
)
-
3
;
dsize
=
ntohs
(
eth_hdr
(
ev_skb
)
->
h_proto
)
-
3
;
memcpy
(((
u8
*
)
pdu
)
+
3
,
((
u8
*
)
ev_pdu
)
+
3
,
dsize
);
skb_put
(
skb
,
dsize
);
}
...
...
net/llc/llc_input.c
View file @
f62f4705
...
...
@@ -111,7 +111,7 @@ static inline int llc_fixup_skb(struct sk_buff *skb)
skb
->
h
.
raw
+=
llc_len
;
skb_pull
(
skb
,
llc_len
);
if
(
skb
->
protocol
==
htons
(
ETH_P_802_2
))
{
u16
pdulen
=
((
struct
ethhdr
*
)
skb
->
mac
.
raw
)
->
h_proto
,
u16
pdulen
=
eth_hdr
(
skb
)
->
h_proto
,
data_size
=
ntohs
(
pdulen
)
-
llc_len
;
skb_trim
(
skb
,
data_size
);
...
...
net/llc/llc_output.c
View file @
f62f4705
...
...
@@ -40,7 +40,8 @@ int llc_mac_hdr_init(struct sk_buff *skb, unsigned char *sa, unsigned char *da)
struct
net_device
*
dev
=
skb
->
dev
;
struct
trh_hdr
*
trh
;
trh
=
(
struct
trh_hdr
*
)
skb_push
(
skb
,
sizeof
(
*
trh
));
skb
->
mac
.
raw
=
skb_push
(
skb
,
sizeof
(
*
trh
));
trh
=
tr_hdr
(
skb
);
trh
->
ac
=
AC
;
trh
->
fc
=
LLC_FRAME
;
if
(
sa
)
...
...
@@ -51,7 +52,6 @@ int llc_mac_hdr_init(struct sk_buff *skb, unsigned char *sa, unsigned char *da)
memcpy
(
trh
->
daddr
,
da
,
dev
->
addr_len
);
tr_source_route
(
skb
,
trh
,
dev
);
}
skb
->
mac
.
raw
=
skb
->
data
;
break
;
}
#endif
...
...
@@ -61,7 +61,7 @@ int llc_mac_hdr_init(struct sk_buff *skb, unsigned char *sa, unsigned char *da)
struct
ethhdr
*
eth
;
skb
->
mac
.
raw
=
skb_push
(
skb
,
sizeof
(
*
eth
));
eth
=
(
struct
ethhdr
*
)
skb
->
mac
.
raw
;
eth
=
eth_hdr
(
skb
)
;
eth
->
h_proto
=
htons
(
len
);
memcpy
(
eth
->
h_dest
,
da
,
ETH_ALEN
);
memcpy
(
eth
->
h_source
,
sa
,
ETH_ALEN
);
...
...
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