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
e891de49
Commit
e891de49
authored
Sep 16, 2003
by
Arnaldo Carvalho de Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
o LLC: move llc_build_and_send_ui_pkt to llc_sap
parent
03c87be7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
32 deletions
+31
-32
net/llc/llc_if.c
net/llc/llc_if.c
+0
-32
net/llc/llc_sap.c
net/llc/llc_sap.c
+31
-0
No files found.
net/llc/llc_if.c
View file @
e891de49
...
@@ -29,36 +29,6 @@
...
@@ -29,36 +29,6 @@
u8
llc_mac_null_var
[
IFHWADDRLEN
];
u8
llc_mac_null_var
[
IFHWADDRLEN
];
/**
* llc_build_and_send_ui_pkt - unitdata request interface for upper layers
* @sap: sap to use
* @skb: packet to send
* @dmac: destination mac address
* @dsap: destination sap
*
* Upper layers calls this function when upper layer wants to send data
* using connection-less mode communication (UI pdu).
*
* Accept data frame from network layer to be sent using connection-
* less mode communication; timeout/retries handled by network layer;
* package primitive as an event and send to SAP event handler
*/
void
llc_build_and_send_ui_pkt
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
,
u8
*
dmac
,
u8
dsap
)
{
struct
llc_sap_state_ev
*
ev
=
llc_sap_ev
(
skb
);
ev
->
saddr
.
lsap
=
sap
->
laddr
.
lsap
;
ev
->
daddr
.
lsap
=
dsap
;
memcpy
(
ev
->
saddr
.
mac
,
skb
->
dev
->
dev_addr
,
IFHWADDRLEN
);
memcpy
(
ev
->
daddr
.
mac
,
dmac
,
IFHWADDRLEN
);
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_build_and_send_test_pkt - TEST interface for upper layers.
* llc_build_and_send_test_pkt - TEST interface for upper layers.
* @sap: sap to use
* @sap: sap to use
...
@@ -262,5 +232,3 @@ int llc_build_and_send_reset_pkt(struct sock *sk)
...
@@ -262,5 +232,3 @@ int llc_build_and_send_reset_pkt(struct sock *sk)
}
}
return
rc
;
return
rc
;
}
}
EXPORT_SYMBOL
(
llc_build_and_send_ui_pkt
);
net/llc/llc_sap.c
View file @
e891de49
...
@@ -194,6 +194,36 @@ void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb)
...
@@ -194,6 +194,36 @@ void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb)
kfree_skb
(
skb
);
kfree_skb
(
skb
);
}
}
/**
* llc_build_and_send_ui_pkt - unitdata request interface for upper layers
* @sap: sap to use
* @skb: packet to send
* @dmac: destination mac address
* @dsap: destination sap
*
* Upper layers calls this function when upper layer wants to send data
* using connection-less mode communication (UI pdu).
*
* Accept data frame from network layer to be sent using connection-
* less mode communication; timeout/retries handled by network layer;
* package primitive as an event and send to SAP event handler
*/
void
llc_build_and_send_ui_pkt
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
,
u8
*
dmac
,
u8
dsap
)
{
struct
llc_sap_state_ev
*
ev
=
llc_sap_ev
(
skb
);
ev
->
saddr
.
lsap
=
sap
->
laddr
.
lsap
;
ev
->
daddr
.
lsap
=
dsap
;
memcpy
(
ev
->
saddr
.
mac
,
skb
->
dev
->
dev_addr
,
IFHWADDRLEN
);
memcpy
(
ev
->
daddr
.
mac
,
dmac
,
IFHWADDRLEN
);
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_sap_rcv - sends received pdus to the sap state machine
* llc_sap_rcv - sends received pdus to the sap state machine
* @sap: current sap component structure.
* @sap: current sap component structure.
...
@@ -300,3 +330,4 @@ void llc_sap_close(struct llc_sap *sap)
...
@@ -300,3 +330,4 @@ void llc_sap_close(struct llc_sap *sap)
EXPORT_SYMBOL
(
llc_sap_open
);
EXPORT_SYMBOL
(
llc_sap_open
);
EXPORT_SYMBOL
(
llc_sap_close
);
EXPORT_SYMBOL
(
llc_sap_close
);
EXPORT_SYMBOL
(
llc_build_and_send_ui_pkt
);
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