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
51383b5f
Commit
51383b5f
authored
Sep 16, 2003
by
Arnaldo Carvalho de Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
o LLC: implement llc_add_pack/llc_remove_pack
parent
50ef8279
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
include/net/llc_mac.h
include/net/llc_mac.h
+7
-0
net/llc/llc_mac.c
net/llc/llc_mac.c
+18
-8
No files found.
include/net/llc_mac.h
View file @
51383b5f
...
@@ -19,4 +19,11 @@
...
@@ -19,4 +19,11 @@
extern
int
llc_rcv
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
,
extern
int
llc_rcv
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
,
struct
packet_type
*
pt
);
struct
packet_type
*
pt
);
extern
u16
lan_hdrs_init
(
struct
sk_buff
*
skb
,
u8
*
sa
,
u8
*
da
);
extern
u16
lan_hdrs_init
(
struct
sk_buff
*
skb
,
u8
*
sa
,
u8
*
da
);
struct
llc_sap
;
struct
sk_buff
;
extern
void
llc_add_pack
(
int
type
,
void
(
*
handler
)(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
));
extern
void
llc_remove_pack
(
int
type
);
#endif
/* LLC_MAC_H */
#endif
/* LLC_MAC_H */
net/llc/llc_mac.c
View file @
51383b5f
...
@@ -31,18 +31,24 @@
...
@@ -31,18 +31,24 @@
static
int
fix_up_incoming_skb
(
struct
sk_buff
*
skb
);
static
int
fix_up_incoming_skb
(
struct
sk_buff
*
skb
);
static
void
llc_station_rcv
(
struct
sk_buff
*
skb
);
static
void
llc_station_rcv
(
struct
sk_buff
*
skb
);
extern
void
llc_sap_handler
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
);
extern
void
llc_conn_handler
(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
);
/*
/*
* Packet handlers for LLC_DEST_SAP and LLC_DEST_CONN.
* Packet handlers for LLC_DEST_SAP and LLC_DEST_CONN.
* FIXME: There will be a registration service in next changesets.
*/
*/
static
void
(
*
llc_type_handlers
[
2
])(
struct
llc_sap
*
sap
,
static
void
(
*
llc_type_handlers
[
2
])(
struct
llc_sap
*
sap
,
struct
sk_buff
*
skb
)
=
{
struct
sk_buff
*
skb
);
[
LLC_DEST_SAP
-
1
]
=
llc_sap_handler
,
[
LLC_DEST_CONN
-
1
]
=
llc_conn_handler
,
void
llc_add_pack
(
int
type
,
void
(
*
handler
)(
struct
llc_sap
*
sap
,
};
struct
sk_buff
*
skb
))
{
if
(
type
==
LLC_DEST_SAP
||
type
==
LLC_DEST_CONN
)
llc_type_handlers
[
type
]
=
handler
;
}
void
llc_remove_pack
(
int
type
)
{
if
(
type
==
LLC_DEST_SAP
||
type
==
LLC_DEST_CONN
)
llc_type_handlers
[
type
]
=
NULL
;
}
/**
/**
* llc_pdu_type - returns which LLC component must handle for PDU
* llc_pdu_type - returns which LLC component must handle for PDU
...
@@ -240,3 +246,7 @@ u16 lan_hdrs_init(struct sk_buff *skb, u8 *sa, u8 *da)
...
@@ -240,3 +246,7 @@ u16 lan_hdrs_init(struct sk_buff *skb, u8 *sa, u8 *da)
}
}
return
rc
;
return
rc
;
}
}
EXPORT_SYMBOL
(
llc_add_pack
);
EXPORT_SYMBOL
(
llc_remove_pack
);
EXPORT_SYMBOL
(
lan_hdrs_init
);
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