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
adc71682
Commit
adc71682
authored
Jun 18, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/acme/net-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
ff7095c0
0931a9dd
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
120 additions
and
120 deletions
+120
-120
include/net/llc_pdu.h
include/net/llc_pdu.h
+11
-11
net/llc/llc_c_ac.c
net/llc/llc_c_ac.c
+13
-13
net/llc/llc_c_ev.c
net/llc/llc_c_ev.c
+76
-76
net/llc/llc_conn.c
net/llc/llc_conn.c
+1
-1
net/llc/llc_evnt.c
net/llc/llc_evnt.c
+8
-8
net/llc/llc_s_ev.c
net/llc/llc_s_ev.c
+10
-10
net/sctp/socket.c
net/sctp/socket.c
+1
-1
No files found.
include/net/llc_pdu.h
View file @
adc71682
...
...
@@ -39,8 +39,8 @@
#define LLC_PDU_CMD_RSP_MASK 0x01
#define LLC_PDU_CMD 0
#define LLC_PDU_RSP 1
#define LLC_PDU_IS_CMD(pdu) ((pdu->ssap & LLC_PDU_RSP) ?
1 : 0
)
#define LLC_PDU_IS_RSP(pdu) ((pdu->ssap & LLC_PDU_RSP) ?
0 : 1
)
#define LLC_PDU_IS_CMD(pdu) ((pdu->ssap & LLC_PDU_RSP) ?
0 : 1
)
#define LLC_PDU_IS_RSP(pdu) ((pdu->ssap & LLC_PDU_RSP) ?
1 : 0
)
/* Get PDU type from 2 lowest-order bits of control field first byte */
#define LLC_PDU_TYPE_I_MASK 0x01
/* 16-bit control field */
...
...
@@ -53,18 +53,18 @@
#define LLC_PDU_TYPE_U 3
/* first two bits */
#define LLC_PDU_TYPE_IS_I(pdu) \
((!(pdu->ctrl_1 & LLC_PDU_TYPE_I_MASK)) ?
0 : 1
)
((!(pdu->ctrl_1 & LLC_PDU_TYPE_I_MASK)) ?
1 : 0
)
#define LLC_PDU_TYPE_IS_U(pdu) \
(((pdu->ctrl_1 & LLC_PDU_TYPE_U_MASK) == LLC_PDU_TYPE_U) ?
0 : 1
)
(((pdu->ctrl_1 & LLC_PDU_TYPE_U_MASK) == LLC_PDU_TYPE_U) ?
1 : 0
)
#define LLC_PDU_TYPE_IS_S(pdu) \
(((pdu->ctrl_1 & LLC_PDU_TYPE_S_MASK) == LLC_PDU_TYPE_S) ?
0 : 1
)
(((pdu->ctrl_1 & LLC_PDU_TYPE_S_MASK) == LLC_PDU_TYPE_S) ?
1 : 0
)
/* U-format PDU control field masks */
#define LLC_U_PF_BIT_MASK 0x10
/* P/F bit mask */
#define LLC_U_PF_IS_1(pdu) ((pdu->ctrl_1 & LLC_U_PF_BIT_MASK) ?
0 : 1
)
#define LLC_U_PF_IS_0(pdu) ((!(pdu->ctrl_1 & LLC_U_PF_BIT_MASK)) ?
0 : 1
)
#define LLC_U_PF_IS_1(pdu) ((pdu->ctrl_1 & LLC_U_PF_BIT_MASK) ?
1 : 0
)
#define LLC_U_PF_IS_0(pdu) ((!(pdu->ctrl_1 & LLC_U_PF_BIT_MASK)) ?
1 : 0
)
#define LLC_U_PDU_CMD_MASK 0xEC
/* cmd/rsp mask */
#define LLC_U_PDU_CMD(pdu) (pdu->ctrl_1 & LLC_U_PDU_CMD_MASK)
...
...
@@ -119,8 +119,8 @@
#define LLC_I_PF_BIT_MASK 0x01
#define LLC_I_PF_IS_0(pdu) ((!(pdu->ctrl_2 & LLC_I_PF_BIT_MASK)) ?
0 : 1
)
#define LLC_I_PF_IS_1(pdu) ((pdu->ctrl_2 & LLC_I_PF_BIT_MASK) ?
0 : 1
)
#define LLC_I_PF_IS_0(pdu) ((!(pdu->ctrl_2 & LLC_I_PF_BIT_MASK)) ?
1 : 0
)
#define LLC_I_PF_IS_1(pdu) ((pdu->ctrl_2 & LLC_I_PF_BIT_MASK) ?
1 : 0
)
/* S-PDU supervisory commands and responses */
...
...
@@ -136,8 +136,8 @@
#define LLC_2_PDU_RSP_RNR 0x04
/* rx not ready rsp */
#define LLC_S_PF_BIT_MASK 0x01
#define LLC_S_PF_IS_0(pdu) ((!(pdu->ctrl_2 & LLC_S_PF_BIT_MASK)) ?
0 : 1
)
#define LLC_S_PF_IS_1(pdu) ((pdu->ctrl_2 & LLC_S_PF_BIT_MASK) ?
0 : 1
)
#define LLC_S_PF_IS_0(pdu) ((!(pdu->ctrl_2 & LLC_S_PF_BIT_MASK)) ?
1 : 0
)
#define LLC_S_PF_IS_1(pdu) ((pdu->ctrl_2 & LLC_S_PF_BIT_MASK) ?
1 : 0
)
#define PDU_SUPV_GET_Nr(pdu) ((pdu->ctrl_2 & 0xFE) >> 1)
#define PDU_GET_NEXT_Vr(sn) (++sn & ~LLC_2_SEQ_NBR_MODULO)
...
...
net/llc/llc_c_ac.c
View file @
adc71682
...
...
@@ -102,13 +102,13 @@ int llc_conn_ac_disc_ind(struct sock *sk, struct sk_buff *skb)
if
(
ev
->
type
==
LLC_CONN_EV_TYPE_PDU
)
{
struct
llc_pdu_un
*
pdu
=
llc_pdu_un_hdr
(
skb
);
if
(
!
LLC_PDU_IS_RSP
(
pdu
)
&&
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
if
(
LLC_PDU_IS_RSP
(
pdu
)
&&
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
LLC_U_PDU_RSP
(
pdu
)
==
LLC_2_PDU_RSP_DM
)
{
reason
=
LLC_DISC_REASON_RX_DM_RSP_PDU
;
rc
=
0
;
}
else
if
(
!
LLC_PDU_IS_CMD
(
pdu
)
&&
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
}
else
if
(
LLC_PDU_IS_CMD
(
pdu
)
&&
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
LLC_U_PDU_CMD
(
pdu
)
==
LLC_2_PDU_CMD_DISC
)
{
reason
=
LLC_DISC_REASON_RX_DISC_CMD_PDU
;
rc
=
0
;
...
...
@@ -146,13 +146,13 @@ int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb)
switch
(
ev
->
type
)
{
case
LLC_CONN_EV_TYPE_PDU
:
if
(
!
LLC_PDU_IS_RSP
(
pdu
)
&&
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
if
(
LLC_PDU_IS_RSP
(
pdu
)
&&
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
LLC_U_PDU_RSP
(
pdu
)
==
LLC_2_PDU_RSP_FRMR
)
{
reason
=
LLC_RESET_REASON_LOCAL
;
rc
=
0
;
}
else
if
(
!
LLC_PDU_IS_CMD
(
pdu
)
&&
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
}
else
if
(
LLC_PDU_IS_CMD
(
pdu
)
&&
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
LLC_U_PDU_CMD
(
pdu
)
==
LLC_2_PDU_CMD_SABME
)
{
reason
=
LLC_RESET_REASON_REMOTE
;
rc
=
0
;
...
...
@@ -198,9 +198,9 @@ int llc_conn_ac_clear_remote_busy_if_f_eq_1(struct sock *sk,
{
struct
llc_pdu_sn
*
pdu
=
llc_pdu_sn_hdr
(
skb
);
if
(
!
LLC_PDU_IS_RSP
(
pdu
)
&&
!
LLC_PDU_TYPE_IS_I
(
pdu
)
&&
!
LLC_I_PF_IS_1
(
pdu
)
&&
llc_sk
(
sk
)
->
ack_pf
)
if
(
LLC_PDU_IS_RSP
(
pdu
)
&&
LLC_PDU_TYPE_IS_I
(
pdu
)
&&
LLC_I_PF_IS_1
(
pdu
)
&&
llc_sk
(
sk
)
->
ack_pf
)
llc_conn_ac_clear_remote_busy
(
sk
,
skb
);
return
0
;
}
...
...
@@ -310,7 +310,7 @@ int llc_conn_ac_send_frmr_rsp_f_set_x(struct sock *sk, struct sk_buff *skb)
struct
llc_opt
*
llc
=
llc_sk
(
sk
);
llc
->
rx_pdu_hdr
=
*
((
u32
*
)
pdu
);
if
(
!
LLC_PDU_IS_CMD
(
pdu
))
if
(
LLC_PDU_IS_CMD
(
pdu
))
llc_pdu_decode_pf_bit
(
skb
,
&
f_bit
);
else
f_bit
=
0
;
...
...
@@ -1228,7 +1228,7 @@ int llc_conn_ac_upd_p_flag(struct sock *sk, struct sk_buff *skb)
{
struct
llc_pdu_sn
*
pdu
=
llc_pdu_sn_hdr
(
skb
);
if
(
!
LLC_PDU_IS_RSP
(
pdu
))
{
if
(
LLC_PDU_IS_RSP
(
pdu
))
{
u8
f_bit
;
llc_pdu_decode_pf_bit
(
skb
,
&
f_bit
);
...
...
net/llc/llc_c_ev.c
View file @
adc71682
This diff is collapsed.
Click to expand it.
net/llc/llc_conn.c
View file @
adc71682
...
...
@@ -356,7 +356,7 @@ static void llc_conn_send_pdus(struct sock *sk)
while
((
skb
=
skb_dequeue
(
&
sk
->
sk_write_queue
))
!=
NULL
)
{
struct
llc_pdu_sn
*
pdu
=
llc_pdu_sn_hdr
(
skb
);
if
(
!
LLC_PDU_TYPE_IS_I
(
pdu
)
&&
if
(
LLC_PDU_TYPE_IS_I
(
pdu
)
&&
!
(
skb
->
dev
->
flags
&
IFF_LOOPBACK
))
{
struct
sk_buff
*
skb2
=
skb_clone
(
skb
,
GFP_ATOMIC
);
...
...
net/llc/llc_evnt.c
View file @
adc71682
...
...
@@ -68,8 +68,8 @@ int llc_stat_ev_rx_null_dsap_xid_c(struct llc_station *station,
struct
llc_pdu_un
*
pdu
=
llc_pdu_un_hdr
(
skb
);
return
ev
->
type
==
LLC_STATION_EV_TYPE_PDU
&&
!
LLC_PDU_IS_CMD
(
pdu
)
&&
/* command PDU */
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
/* U type PDU */
LLC_PDU_IS_CMD
(
pdu
)
&&
/* command PDU */
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
/* U type PDU */
LLC_U_PDU_CMD
(
pdu
)
==
LLC_1_PDU_CMD_XID
&&
!
pdu
->
dsap
?
0
:
1
;
/* NULL DSAP value */
}
...
...
@@ -81,8 +81,8 @@ int llc_stat_ev_rx_null_dsap_0_xid_r_xid_r_cnt_eq(struct llc_station *station,
struct
llc_pdu_un
*
pdu
=
llc_pdu_un_hdr
(
skb
);
return
ev
->
type
==
LLC_STATION_EV_TYPE_PDU
&&
!
LLC_PDU_IS_RSP
(
pdu
)
&&
/* response PDU */
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
/* U type PDU */
LLC_PDU_IS_RSP
(
pdu
)
&&
/* response PDU */
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
/* U type PDU */
LLC_U_PDU_RSP
(
pdu
)
==
LLC_1_PDU_CMD_XID
&&
!
pdu
->
dsap
&&
/* NULL DSAP value */
!
station
->
xid_r_count
?
0
:
1
;
...
...
@@ -95,8 +95,8 @@ int llc_stat_ev_rx_null_dsap_1_xid_r_xid_r_cnt_eq(struct llc_station *station,
struct
llc_pdu_un
*
pdu
=
llc_pdu_un_hdr
(
skb
);
return
ev
->
type
==
LLC_STATION_EV_TYPE_PDU
&&
!
LLC_PDU_IS_RSP
(
pdu
)
&&
/* response PDU */
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
/* U type PDU */
LLC_PDU_IS_RSP
(
pdu
)
&&
/* response PDU */
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
/* U type PDU */
LLC_U_PDU_RSP
(
pdu
)
==
LLC_1_PDU_CMD_XID
&&
!
pdu
->
dsap
&&
/* NULL DSAP value */
station
->
xid_r_count
==
1
?
0
:
1
;
...
...
@@ -109,8 +109,8 @@ int llc_stat_ev_rx_null_dsap_test_c(struct llc_station *station,
struct
llc_pdu_un
*
pdu
=
llc_pdu_un_hdr
(
skb
);
return
ev
->
type
==
LLC_STATION_EV_TYPE_PDU
&&
!
LLC_PDU_IS_CMD
(
pdu
)
&&
/* command PDU */
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
/* U type PDU */
LLC_PDU_IS_CMD
(
pdu
)
&&
/* command PDU */
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
/* U type PDU */
LLC_U_PDU_CMD
(
pdu
)
==
LLC_1_PDU_CMD_TEST
&&
!
pdu
->
dsap
?
0
:
1
;
/* NULL DSAP */
}
...
...
net/llc/llc_s_ev.c
View file @
adc71682
...
...
@@ -33,8 +33,8 @@ int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb)
struct
llc_sap_state_ev
*
ev
=
llc_sap_ev
(
skb
);
struct
llc_pdu_un
*
pdu
=
llc_pdu_un_hdr
(
skb
);
return
ev
->
type
==
LLC_SAP_EV_TYPE_PDU
&&
!
LLC_PDU_IS_CMD
(
pdu
)
&&
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
return
ev
->
type
==
LLC_SAP_EV_TYPE_PDU
&&
LLC_PDU_IS_CMD
(
pdu
)
&&
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
LLC_U_PDU_CMD
(
pdu
)
==
LLC_1_PDU_CMD_UI
?
0
:
1
;
}
...
...
@@ -62,8 +62,8 @@ int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb)
struct
llc_sap_state_ev
*
ev
=
llc_sap_ev
(
skb
);
struct
llc_pdu_un
*
pdu
=
llc_pdu_un_hdr
(
skb
);
return
ev
->
type
==
LLC_SAP_EV_TYPE_PDU
&&
!
LLC_PDU_IS_CMD
(
pdu
)
&&
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
return
ev
->
type
==
LLC_SAP_EV_TYPE_PDU
&&
LLC_PDU_IS_CMD
(
pdu
)
&&
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
LLC_U_PDU_CMD
(
pdu
)
==
LLC_1_PDU_CMD_XID
?
0
:
1
;
}
...
...
@@ -72,8 +72,8 @@ int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb)
struct
llc_sap_state_ev
*
ev
=
llc_sap_ev
(
skb
);
struct
llc_pdu_un
*
pdu
=
llc_pdu_un_hdr
(
skb
);
return
ev
->
type
==
LLC_SAP_EV_TYPE_PDU
&&
!
LLC_PDU_IS_RSP
(
pdu
)
&&
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
return
ev
->
type
==
LLC_SAP_EV_TYPE_PDU
&&
LLC_PDU_IS_RSP
(
pdu
)
&&
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
LLC_U_PDU_RSP
(
pdu
)
==
LLC_1_PDU_CMD_XID
?
0
:
1
;
}
...
...
@@ -91,8 +91,8 @@ int llc_sap_ev_rx_test_c(struct llc_sap *sap, struct sk_buff *skb)
struct
llc_sap_state_ev
*
ev
=
llc_sap_ev
(
skb
);
struct
llc_pdu_un
*
pdu
=
llc_pdu_un_hdr
(
skb
);
return
ev
->
type
==
LLC_SAP_EV_TYPE_PDU
&&
!
LLC_PDU_IS_CMD
(
pdu
)
&&
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
return
ev
->
type
==
LLC_SAP_EV_TYPE_PDU
&&
LLC_PDU_IS_CMD
(
pdu
)
&&
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
LLC_U_PDU_CMD
(
pdu
)
==
LLC_1_PDU_CMD_TEST
?
0
:
1
;
}
...
...
@@ -101,8 +101,8 @@ int llc_sap_ev_rx_test_r(struct llc_sap *sap, struct sk_buff *skb)
struct
llc_sap_state_ev
*
ev
=
llc_sap_ev
(
skb
);
struct
llc_pdu_un
*
pdu
=
llc_pdu_un_hdr
(
skb
);
return
ev
->
type
==
LLC_SAP_EV_TYPE_PDU
&&
!
LLC_PDU_IS_RSP
(
pdu
)
&&
!
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
return
ev
->
type
==
LLC_SAP_EV_TYPE_PDU
&&
LLC_PDU_IS_RSP
(
pdu
)
&&
LLC_PDU_TYPE_IS_U
(
pdu
)
&&
LLC_U_PDU_RSP
(
pdu
)
==
LLC_1_PDU_CMD_TEST
?
0
:
1
;
}
...
...
net/sctp/socket.c
View file @
adc71682
...
...
@@ -3328,7 +3328,7 @@ static struct sctp_bind_bucket *sctp_bucket_create(
/* Caller must hold hashbucket lock for this tb with local BH disabled */
static
void
sctp_bucket_destroy
(
struct
sctp_bind_bucket
*
pp
)
{
if
(
!
hlist_empty
(
&
pp
->
sk_list
))
{
if
(
hlist_empty
(
&
pp
->
sk_list
))
{
if
(
pp
->
next
)
pp
->
next
->
pprev
=
pp
->
pprev
;
*
(
pp
->
pprev
)
=
pp
->
next
;
...
...
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