Lines Matching full:llc
17 #include <net/llc.h>
65 struct llc_sock *llc = llc_sk(skb->sk); in llc_conn_state_process() local
132 if (!llc_data_accept_state(llc->state)) in llc_conn_state_process()
135 rc = llc->failed_data_req = 1; in llc_conn_state_process()
216 struct llc_sock *llc; in llc_conn_resend_i_pdu_as_cmd() local
226 llc = llc_sk(sk); in llc_conn_resend_i_pdu_as_cmd()
228 while ((skb = skb_dequeue(&llc->pdu_unack_q)) != NULL) { in llc_conn_resend_i_pdu_as_cmd()
234 llc->vS = LLC_I_GET_NS(pdu); in llc_conn_resend_i_pdu_as_cmd()
238 llc->vS = (llc->vS + 1) % LLC_2_SEQ_NBR_MODULO; in llc_conn_resend_i_pdu_as_cmd()
258 struct llc_sock *llc = llc_sk(sk); in llc_conn_resend_i_pdu_as_rsp() local
268 while ((skb = skb_dequeue(&llc->pdu_unack_q)) != NULL) { in llc_conn_resend_i_pdu_as_rsp()
275 llc->vS = LLC_I_GET_NS(pdu); in llc_conn_resend_i_pdu_as_rsp()
279 llc->vS = (llc->vS + 1) % LLC_2_SEQ_NBR_MODULO; in llc_conn_resend_i_pdu_as_rsp()
300 struct llc_sock *llc = llc_sk(sk); in llc_conn_remove_acked_pdus() local
301 int q_len = skb_queue_len(&llc->pdu_unack_q); in llc_conn_remove_acked_pdus()
305 skb = skb_peek(&llc->pdu_unack_q); in llc_conn_remove_acked_pdus()
313 skb = skb_dequeue(&llc->pdu_unack_q); in llc_conn_remove_acked_pdus()
318 *how_many_unacked = skb_queue_len(&llc->pdu_unack_q); in llc_conn_remove_acked_pdus()
360 struct llc_sock *llc = llc_sk(sk); in llc_conn_service() local
363 if (llc->state > NBR_CONN_STATES) in llc_conn_service()
370 llc->state = trans->next_state; in llc_conn_service()
371 if (!llc_data_accept_state(llc->state)) in llc_conn_service()
393 struct llc_sock *llc = llc_sk(sk); in llc_qualify_conn_ev() local
395 &llc_conn_state_table[llc->state - 1]; in llc_qualify_conn_ev()
401 llc_find_offset(llc->state - 1, ev->type); in llc_qualify_conn_ev()
460 struct llc_sock *llc = llc_sk(sk); in llc_estab_match() local
463 llc->laddr.lsap == laddr->lsap && in llc_estab_match()
464 llc->daddr.lsap == daddr->lsap && in llc_estab_match()
465 ether_addr_equal(llc->laddr.mac, laddr->mac) && in llc_estab_match()
466 ether_addr_equal(llc->daddr.mac, daddr->mac); in llc_estab_match()
472 * @daddr: address of remote LLC (MAC + SAP)
473 * @laddr: address of local LLC (MAC + SAP)
537 struct llc_sock *llc = llc_sk(sk); in llc_listener_match() local
541 llc->laddr.lsap == laddr->lsap && in llc_listener_match()
542 ether_addr_equal(llc->laddr.mac, laddr->mac); in llc_listener_match()
585 * @laddr: address of local LLC (MAC + SAP)
708 struct llc_sock *llc = llc_sk(sk); in llc_sap_add_socket() local
709 struct hlist_head *dev_hb = llc_sk_dev_hash(sap, llc->dev->ifindex); in llc_sap_add_socket()
710 struct hlist_nulls_head *laddr_hb = llc_sk_laddr_hash(sap, &llc->laddr); in llc_sap_add_socket()
719 hlist_add_head(&llc->dev_hash_node, dev_hb); in llc_sap_add_socket()
733 struct llc_sock *llc = llc_sk(sk); in llc_sap_remove_socket() local
737 hlist_del(&llc->dev_hash_node); in llc_sap_remove_socket()
766 struct llc_sock *newllc, *llc = llc_sk(sk); in llc_create_incoming_sock() local
775 llc_sap_add_socket(llc->sap, newsk); in llc_create_incoming_sock()
776 llc_sap_hold(llc->sap); in llc_create_incoming_sock()
800 * llc_adm_actions_2 in net/llc/llc_c_st.c) and send a packet to in llc_conn_handler()
850 * @sk: LLC sock (p8022 connection)
861 struct llc_sock *llc = llc_sk(sk); in llc_backlog_rcv() local
864 if (likely(llc->state > 1)) /* not closed */ in llc_backlog_rcv()
870 if (likely(llc->state > 1)) /* not closed */ in llc_backlog_rcv()
886 * llc_sk_init - Initializes a socket with default llc values.
889 * Initializes a socket with default llc values.
893 struct llc_sock *llc = llc_sk(sk); in llc_sk_init() local
895 llc->state = LLC_CONN_STATE_ADM; in llc_sk_init()
896 llc->inc_cntr = llc->dec_cntr = 2; in llc_sk_init()
897 llc->dec_step = llc->connect_step = 1; in llc_sk_init()
899 timer_setup(&llc->ack_timer.timer, llc_conn_ack_tmr_cb, 0); in llc_sk_init()
900 llc->ack_timer.expire = sysctl_llc2_ack_timeout; in llc_sk_init()
902 timer_setup(&llc->pf_cycle_timer.timer, llc_conn_pf_cycle_tmr_cb, 0); in llc_sk_init()
903 llc->pf_cycle_timer.expire = sysctl_llc2_p_timeout; in llc_sk_init()
905 timer_setup(&llc->rej_sent_timer.timer, llc_conn_rej_tmr_cb, 0); in llc_sk_init()
906 llc->rej_sent_timer.expire = sysctl_llc2_rej_timeout; in llc_sk_init()
908 timer_setup(&llc->busy_state_timer.timer, llc_conn_busy_tmr_cb, 0); in llc_sk_init()
909 llc->busy_state_timer.expire = sysctl_llc2_busy_timeout; in llc_sk_init()
911 llc->n2 = 2; /* max retransmit */ in llc_sk_init()
912 llc->k = 2; /* tx win size, will adjust dynam */ in llc_sk_init()
913 llc->rw = 128; /* rx win size (opt and equal to in llc_sk_init()
914 * tx_win of remote LLC) */ in llc_sk_init()
915 skb_queue_head_init(&llc->pdu_unack_q); in llc_sk_init()
920 * llc_sk_alloc - Allocates LLC sock
927 * Allocates a LLC sock and initializes it. Returns the new LLC sock
940 printk(KERN_DEBUG "LLC socket %p created in %s, now we have %d alive\n", sk, in llc_sk_alloc()
949 struct llc_sock *llc = llc_sk(sk); in llc_sk_stop_all_timers() local
952 del_timer_sync(&llc->pf_cycle_timer.timer); in llc_sk_stop_all_timers()
953 del_timer_sync(&llc->ack_timer.timer); in llc_sk_stop_all_timers()
954 del_timer_sync(&llc->rej_sent_timer.timer); in llc_sk_stop_all_timers()
955 del_timer_sync(&llc->busy_state_timer.timer); in llc_sk_stop_all_timers()
957 del_timer(&llc->pf_cycle_timer.timer); in llc_sk_stop_all_timers()
958 del_timer(&llc->ack_timer.timer); in llc_sk_stop_all_timers()
959 del_timer(&llc->rej_sent_timer.timer); in llc_sk_stop_all_timers()
960 del_timer(&llc->busy_state_timer.timer); in llc_sk_stop_all_timers()
963 llc->ack_must_be_send = 0; in llc_sk_stop_all_timers()
964 llc->ack_pf = 0; in llc_sk_stop_all_timers()
968 * llc_sk_free - Frees a LLC socket
971 * Frees a LLC socket
975 struct llc_sock *llc = llc_sk(sk); in llc_sk_free() local
977 llc->state = LLC_CONN_OUT_OF_SVC; in llc_sk_free()
982 skb_queue_len(&llc->pdu_unack_q), in llc_sk_free()
987 skb_queue_purge(&llc->pdu_unack_q); in llc_sk_free()
990 printk(KERN_DEBUG "Destruction of LLC sock %p delayed in %s, cnt=%d\n", in llc_sk_free()
992 printk(KERN_DEBUG "%d LLC sockets are still alive\n", in llc_sk_free()
996 printk(KERN_DEBUG "LLC socket %p released in %s, %d are still alive\n", sk, in llc_sk_free()
1005 * @sk: LLC socket to reset
1012 struct llc_sock *llc = llc_sk(sk); in llc_sk_reset() local
1016 skb_queue_purge(&llc->pdu_unack_q); in llc_sk_reset()
1017 llc->remote_busy_flag = 0; in llc_sk_reset()
1018 llc->cause_flag = 0; in llc_sk_reset()
1019 llc->retry_count = 0; in llc_sk_reset()
1021 llc->f_flag = 0; in llc_sk_reset()
1022 llc->s_flag = 0; in llc_sk_reset()
1023 llc->ack_pf = 0; in llc_sk_reset()
1024 llc->first_pdu_Ns = 0; in llc_sk_reset()
1025 llc->ack_must_be_send = 0; in llc_sk_reset()
1026 llc->dec_step = 1; in llc_sk_reset()
1027 llc->inc_cntr = 2; in llc_sk_reset()
1028 llc->dec_cntr = 2; in llc_sk_reset()
1029 llc->X = 0; in llc_sk_reset()
1030 llc->failed_data_req = 0 ; in llc_sk_reset()
1031 llc->last_nr = 0; in llc_sk_reset()