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
b4e17e9c
Commit
b4e17e9c
authored
Sep 25, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/home/acme/BK/llc-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
2aceaa81
c84af579
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
33 deletions
+28
-33
include/net/llc_main.h
include/net/llc_main.h
+0
-1
include/net/llc_sap.h
include/net/llc_sap.h
+1
-2
net/llc/llc_if.c
net/llc/llc_if.c
+3
-3
net/llc/llc_mac.c
net/llc/llc_mac.c
+16
-13
net/llc/llc_main.c
net/llc/llc_main.c
+1
-1
net/llc/llc_sap.c
net/llc/llc_sap.c
+7
-13
No files found.
include/net/llc_main.h
View file @
b4e17e9c
...
...
@@ -63,5 +63,4 @@ extern void llc_station_state_process(struct llc_station *station,
extern
void
llc_station_send_pdu
(
struct
llc_station
*
station
,
struct
sk_buff
*
skb
);
extern
struct
sk_buff
*
llc_alloc_frame
(
void
);
extern
struct
packet_type
llc_packet_type
;
#endif
/* LLC_MAIN_H */
include/net/llc_sap.h
View file @
b4e17e9c
...
...
@@ -42,8 +42,7 @@ struct llc_sap {
extern
void
llc_sap_assign_sock
(
struct
llc_sap
*
sap
,
struct
sock
*
sk
);
extern
void
llc_sap_unassign_sock
(
struct
llc_sap
*
sap
,
struct
sock
*
sk
);
extern
void
llc_sap_state_process
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
,
struct
packet_type
*
pt
);
extern
void
llc_sap_state_process
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
);
extern
void
llc_sap_rtn_pdu
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
);
extern
void
llc_sap_send_pdu
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
);
#endif
/* LLC_SAP_H */
net/llc/llc_if.c
View file @
b4e17e9c
...
...
@@ -107,7 +107,7 @@ void llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb,
ev
->
type
=
LLC_SAP_EV_TYPE_PRIM
;
ev
->
prim
=
LLC_DATAUNIT_PRIM
;
ev
->
prim_type
=
LLC_PRIM_TYPE_REQ
;
llc_sap_state_process
(
sap
,
skb
,
&
llc_packet_type
);
llc_sap_state_process
(
sap
,
skb
);
}
/**
...
...
@@ -133,7 +133,7 @@ void llc_build_and_send_test_pkt(struct llc_sap *sap,
ev
->
type
=
LLC_SAP_EV_TYPE_PRIM
;
ev
->
prim
=
LLC_TEST_PRIM
;
ev
->
prim_type
=
LLC_PRIM_TYPE_REQ
;
llc_sap_state_process
(
sap
,
skb
,
&
llc_packet_type
);
llc_sap_state_process
(
sap
,
skb
);
}
/**
...
...
@@ -159,7 +159,7 @@ void llc_build_and_send_xid_pkt(struct llc_sap *sap, struct sk_buff *skb,
ev
->
type
=
LLC_SAP_EV_TYPE_PRIM
;
ev
->
prim
=
LLC_XID_PRIM
;
ev
->
prim_type
=
LLC_PRIM_TYPE_REQ
;
llc_sap_state_process
(
sap
,
skb
,
&
llc_packet_type
);
llc_sap_state_process
(
sap
,
skb
);
}
/**
...
...
net/llc/llc_mac.c
View file @
b4e17e9c
...
...
@@ -37,8 +37,7 @@ u8 llc_mac_null_var[IFHWADDRLEN];
static
void
fix_up_incoming_skb
(
struct
sk_buff
*
skb
);
static
void
llc_station_rcv
(
struct
sk_buff
*
skb
);
static
void
llc_sap_rcv
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
,
struct
packet_type
*
pt
);
static
void
llc_sap_rcv
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
);
/**
* mac_send_pdu - Sends PDU to specific device.
...
...
@@ -114,16 +113,22 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,
}
llc_decode_pdu_type
(
skb
,
&
dest
);
if
(
dest
==
LLC_DEST_SAP
)
{
/* type 1 services */
if
(
sap
->
rcv_func
)
sap
->
rcv_func
(
skb
,
dev
,
pt
);
else
{
struct
llc_addr
laddr
;
struct
sock
*
sk
;
llc_pdu_decode_da
(
skb
,
laddr
.
mac
);
llc_pdu_decode_dsap
(
skb
,
&
laddr
.
lsap
);
skb
->
sk
=
sk
=
llc_lookup_dgram
(
sap
,
&
laddr
);
llc_sap_rcv
(
sap
,
skb
,
pt
);
if
(
sk
)
sk
=
llc_lookup_dgram
(
sap
,
&
laddr
);
if
(
!
sk
)
goto
drop
;
skb
->
sk
=
sk
;
llc_sap_rcv
(
sap
,
skb
);
sock_put
(
sk
);
}
}
else
if
(
dest
==
LLC_DEST_CONN
)
{
struct
llc_addr
saddr
,
daddr
;
struct
sock
*
sk
;
...
...
@@ -254,18 +259,16 @@ int llc_conn_rcv(struct sock* sk, struct sk_buff *skb)
* llc_sap_rcv - sends received pdus to the sap state machine
* @sap: current sap component structure.
* @skb: received frame.
* @pt: packet type
*
* Sends received pdus to the sap state machine.
*/
static
void
llc_sap_rcv
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
,
struct
packet_type
*
pt
)
static
void
llc_sap_rcv
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
)
{
struct
llc_sap_state_ev
*
ev
=
llc_sap_ev
(
skb
);
ev
->
type
=
LLC_SAP_EV_TYPE_PDU
;
ev
->
reason
=
0
;
llc_sap_state_process
(
sap
,
skb
,
pt
);
llc_sap_state_process
(
sap
,
skb
);
}
/**
...
...
net/llc/llc_main.c
View file @
b4e17e9c
...
...
@@ -613,7 +613,7 @@ static int llc_proc_get_info(char *bf, char **start, off_t offset, int length)
return
len
;
}
struct
packet_type
llc_packet_type
=
{
st
atic
st
ruct
packet_type
llc_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_802_2
),
.
func
=
llc_rcv
,
.
data
=
(
void
*
)
1
,
...
...
net/llc/llc_sap.c
View file @
b4e17e9c
...
...
@@ -79,14 +79,12 @@ void llc_sap_unassign_sock(struct llc_sap *sap, struct sock *sk)
* llc_sap_state_process - sends event to SAP state machine
* @sap: sap to use
* @skb: pointer to occurred event
* @pt: packet type, for datalink protos
*
* After executing actions of the event, upper layer will be indicated
* if needed(on receiving an UI frame). sk can be null for the
* datalink_proto case.
*/
void
llc_sap_state_process
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
,
struct
packet_type
*
pt
)
void
llc_sap_state_process
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
)
{
struct
llc_sap_state_ev
*
ev
=
llc_sap_ev
(
skb
);
...
...
@@ -99,9 +97,6 @@ void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb,
ev
->
ind_cfm_flag
=
0
;
llc_sap_next_state
(
sap
,
skb
);
if
(
ev
->
ind_cfm_flag
==
LLC_IND
)
{
if
(
sap
->
rcv_func
)
sap
->
rcv_func
(
skb
,
skb
->
dev
,
pt
);
else
{
if
(
skb
->
sk
->
state
==
TCP_LISTEN
)
kfree_skb
(
skb
);
else
{
...
...
@@ -112,7 +107,6 @@ void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb,
kfree_skb
(
skb
);
}
}
}
kfree_skb
(
skb
);
}
...
...
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