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
86b74abd
Commit
86b74abd
authored
Sep 22, 2002
by
Arnaldo Carvalho de Melo
Committed by
David S. Miller
Sep 22, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[LLC] Make llc_save_primitive ready for dataunit/xid/test DGRAM packets
parent
5d8c0602
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
net/llc/llc_conn.c
net/llc/llc_conn.c
+9
-11
No files found.
net/llc/llc_conn.c
View file @
86b74abd
...
@@ -39,22 +39,20 @@ static struct llc_conn_state_trans *llc_qualify_conn_ev(struct sock *sk,
...
@@ -39,22 +39,20 @@ static struct llc_conn_state_trans *llc_qualify_conn_ev(struct sock *sk,
/* Offset table on connection states transition diagram */
/* Offset table on connection states transition diagram */
static
int
llc_offset_table
[
NBR_CONN_STATES
][
NBR_CONN_EV
];
static
int
llc_offset_table
[
NBR_CONN_STATES
][
NBR_CONN_EV
];
static
void
llc_save_primitive
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
void
llc_save_primitive
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
u8
prim
)
u8
ua
,
u8
test
,
u8
xid
)
{
{
struct
llc_opt
*
llc
=
llc_sk
(
sk
);
struct
sockaddr_llc
*
addr
=
llc_ui_skb_cb
(
skb
);
struct
sockaddr_llc
*
addr
=
llc_ui_skb_cb
(
skb
);
/* save primitive for use by the user. */
/* save primitive for use by the user. */
addr
->
sllc_family
=
sk
->
family
;
addr
->
sllc_family
=
sk
->
family
;
addr
->
sllc_arphrd
=
skb
->
dev
->
type
;
addr
->
sllc_arphrd
=
skb
->
dev
->
type
;
addr
->
sllc_test
=
test
;
addr
->
sllc_test
=
prim
==
LLC_TEST_PRIM
;
addr
->
sllc_xid
=
xid
;
addr
->
sllc_xid
=
prim
==
LLC_XID_PRIM
;
addr
->
sllc_ua
=
ua
;
addr
->
sllc_ua
=
prim
==
LLC_DATAUNIT_PRIM
;
addr
->
sllc_dsap
=
llc
->
sap
->
laddr
.
lsap
;
llc_pdu_decode_sa
(
skb
,
addr
->
sllc_smac
)
;
memcpy
(
addr
->
sllc_dmac
,
llc
->
laddr
.
mac
,
IFHWADDRLEN
);
llc_pdu_decode_da
(
skb
,
addr
->
sllc_dmac
);
addr
->
sllc_ssap
=
llc
->
daddr
.
lsap
;
llc_pdu_decode_dsap
(
skb
,
&
addr
->
sllc_dsap
)
;
memcpy
(
addr
->
sllc_smac
,
llc
->
daddr
.
mac
,
IFHWADDRLEN
);
llc_pdu_decode_ssap
(
skb
,
&
addr
->
sllc_ssap
);
}
}
/**
/**
...
@@ -96,7 +94,7 @@ int llc_conn_state_process(struct sock *sk, struct sk_buff *skb)
...
@@ -96,7 +94,7 @@ int llc_conn_state_process(struct sock *sk, struct sk_buff *skb)
*/
*/
switch
(
flag
)
{
switch
(
flag
)
{
case
LLC_DATA_PRIM
+
1
:
case
LLC_DATA_PRIM
+
1
:
llc_save_primitive
(
sk
,
skb
,
0
,
0
,
0
);
llc_save_primitive
(
sk
,
skb
,
LLC_DATA_PRIM
);
if
(
sock_queue_rcv_skb
(
sk
,
skb
))
{
if
(
sock_queue_rcv_skb
(
sk
,
skb
))
{
/*
/*
* FIXME: have to sync the LLC state
* FIXME: have to sync the LLC state
...
...
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