Linux Kernel
3.7.1
|
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/rculist_nulls.h>
#include <linux/hash.h>
#include <linux/jhash.h>
#include <linux/atomic.h>
Go to the source code of this file.
Data Structures | |
struct | llc_addr |
struct | llc_sap |
Macros | |
#define | LLC_SAP_STATE_INACTIVE 1 |
#define | LLC_SAP_STATE_ACTIVE 2 |
#define | LLC_SK_DEV_HASH_BITS 6 |
#define | LLC_SK_DEV_HASH_ENTRIES (1<<LLC_SK_DEV_HASH_BITS) |
#define | LLC_SK_LADDR_HASH_BITS 6 |
#define | LLC_SK_LADDR_HASH_ENTRIES (1<<LLC_SK_LADDR_HASH_BITS) |
#define | LLC_DEST_INVALID 0 /* Invalid LLC PDU type */ |
#define | LLC_DEST_SAP 1 /* Type 1 goes here */ |
#define | LLC_DEST_CONN 2 /* Type 2 goes here */ |
#define | llc_proc_init() (0) |
#define | llc_proc_exit() do { } while(0) |
#define | llc_sysctl_init() (0) |
#define | llc_sysctl_exit() do { } while(0) |
Functions | |
int | llc_rcv (struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
int | llc_mac_hdr_init (struct sk_buff *skb, const unsigned char *sa, const unsigned char *da) |
void | llc_add_pack (int type, void(*handler)(struct llc_sap *sap, struct sk_buff *skb)) |
void | llc_remove_pack (int type) |
void | llc_set_station_handler (void(*handler)(struct sk_buff *skb)) |
struct llc_sap * | llc_sap_open (unsigned char lsap, int(*rcv)(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)) |
void | llc_sap_close (struct llc_sap *sap) |
struct llc_sap * | llc_sap_find (unsigned char sap_value) |
int | llc_build_and_send_ui_pkt (struct llc_sap *sap, struct sk_buff *skb, unsigned char *dmac, unsigned char dsap) |
void | llc_sap_handler (struct llc_sap *sap, struct sk_buff *skb) |
void | llc_conn_handler (struct llc_sap *sap, struct sk_buff *skb) |
void | llc_station_init (void) |
void | llc_station_exit (void) |
Variables | |
struct list_head | llc_sap_list |
spinlock_t | llc_sap_list_lock |
#define LLC_SK_DEV_HASH_ENTRIES (1<<LLC_SK_DEV_HASH_BITS) |
#define LLC_SK_LADDR_HASH_ENTRIES (1<<LLC_SK_LADDR_HASH_BITS) |
Definition at line 42 of file llc_input.c.
int llc_build_and_send_ui_pkt | ( | struct llc_sap * | sap, |
struct sk_buff * | skb, | ||
unsigned char * | dmac, | ||
unsigned char | dsap | ||
) |
llc_build_and_send_ui_pkt - unitdata request interface for upper layers : sap to use : packet to send : destination mac address : 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
Definition at line 65 of file llc_output.c.
Definition at line 787 of file llc_conn.c.
int llc_rcv | ( | struct sk_buff * | skb, |
struct net_device * | dev, | ||
struct packet_type * | pt, | ||
struct net_device * | orig_dev | ||
) |
llc_rcv - 802.2 entry point from net lower layers : received pdu : device that receive pdu : packet type
When the system receives a 802.2 frame this function is called. It checks SAP and connection of received pdu and passes frame to llc_{station,sap,conn}_rcv for sending to proper state machine. If the frame is related to a busy connection (a connection is sending data now), it queues this frame in the connection's backlog.
Definition at line 154 of file llc_input.c.
Definition at line 50 of file llc_input.c.
llc_sap_close - close interface for upper layers. : SAP to be closed.
Close interface function to upper layer. Each one who wants to close an open SAP (for example NetBEUI) should call this function. Removes this sap from the list of saps in the station and then frees the memory for this sap.
Definition at line 122 of file llc_core.c.
llc_sap_find - searchs a SAP in station : sap to be found
Searchs for a sap in the sap list of the LLC's station upon the sap ID. If the sap is found it will be refcounted and the user will have to do a llc_sap_put after use. Returns the sap or NULL if not found.
Definition at line 70 of file llc_core.c.
|
read |
llc_sap_open - open interface to the upper layers. : SAP number. : rcv func for datalink protos
Interface function to upper layer. Each one who wants to get a SAP (for example NetBEUI) should call this function. Returns the opened SAP for success, NULL for failure.
Definition at line 91 of file llc_core.c.
Definition at line 57 of file llc_input.c.
Definition at line 122 of file llc_station.c.
Definition at line 117 of file llc_station.c.
spinlock_t llc_sap_list_lock |