static void llc_process_tmr_ev(struct sock *sk, struct sk_buff *skb);
static int llc_conn_ac_data_confirm(struct sock *sk, struct sk_buff *ev);
+static int llc_conn_ac_inc_npta_value(struct sock *sk, struct sk_buff *skb);
+
+static int llc_conn_ac_send_rr_rsp_f_set_ackpf(struct sock *sk,
+ struct sk_buff *skb);
+
+static int llc_conn_ac_set_p_flag_1(struct sock *sk, struct sk_buff *skb);
+
#define INCORRECT 0
int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb)
return 0;
}
-int llc_conn_ac_report_status(struct sock *sk, struct sk_buff *skb)
-{
- return 0;
-}
-
int llc_conn_ac_clear_remote_busy_if_f_eq_1(struct sock *sk,
struct sk_buff *skb)
{
goto out;
}
-int llc_conn_ac_send_dm_rsp_f_set_f_flag(struct sock *sk, struct sk_buff *skb)
-{
- int rc = -ENOBUFS;
- struct sk_buff *nskb = llc_alloc_frame();
-
- if (nskb) {
- struct llc_opt *llc = llc_sk(sk);
- struct llc_sap *sap = llc->sap;
- u8 f_bit = llc->f_flag;
-
- nskb->dev = llc->dev;
- llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap,
- llc->daddr.lsap, LLC_PDU_RSP);
- llc_pdu_init_as_dm_rsp(nskb, f_bit);
- rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac);
- if (rc)
- goto free;
- llc_conn_send_pdu(sk, nskb);
- }
-out:
- return rc;
-free:
- kfree_skb(nskb);
- goto out;
-}
-
int llc_conn_ac_send_frmr_rsp_f_set_x(struct sock *sk, struct sk_buff *skb)
{
u8 f_bit;
return rc;
}
-int llc_conn_ac_send_i_cmd_p_set_0(struct sock *sk, struct sk_buff *skb)
+static int llc_conn_ac_send_i_cmd_p_set_0(struct sock *sk, struct sk_buff *skb)
{
int rc;
struct llc_opt *llc = llc_sk(sk);
return rc;
}
-int llc_conn_ac_resend_i_cmd_p_set_1(struct sock *sk, struct sk_buff *skb)
-{
- struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb);
- u8 nr = LLC_I_GET_NR(pdu);
-
- llc_conn_resend_i_pdu_as_cmd(sk, nr, 1);
- return 0;
-}
-
-int llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr(struct sock *sk,
- struct sk_buff *skb)
-{
- struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb);
- u8 nr = LLC_I_GET_NR(pdu);
- int rc = llc_conn_ac_send_rr_cmd_p_set_1(sk, skb);
-
- if (!rc)
- llc_conn_resend_i_pdu_as_cmd(sk, nr, 0);
- return rc;
-}
-
int llc_conn_ac_send_i_xxx_x_set_0(struct sock *sk, struct sk_buff *skb)
{
int rc;
goto out;
}
-int llc_conn_ac_send_ack_cmd_p_set_1(struct sock *sk, struct sk_buff *skb)
-{
- int rc = -ENOBUFS;
- struct sk_buff *nskb = llc_alloc_frame();
-
- if (nskb) {
- struct llc_opt *llc = llc_sk(sk);
- struct llc_sap *sap = llc->sap;
-
- nskb->dev = llc->dev;
- llc_pdu_header_init(nskb, LLC_PDU_TYPE_S, sap->laddr.lsap,
- llc->daddr.lsap, LLC_PDU_CMD);
- llc_pdu_init_as_rr_cmd(nskb, 1, llc->vR);
- rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac);
- if (rc)
- goto free;
- llc_conn_send_pdu(sk, nskb);
- }
-out:
- return rc;
-free:
- kfree_skb(nskb);
- goto out;
-}
-
int llc_conn_ac_send_rr_rsp_f_set_1(struct sock *sk, struct sk_buff *skb)
{
int rc = -ENOBUFS;
goto out;
}
-int llc_conn_ac_send_ua_rsp_f_set_f_flag(struct sock *sk, struct sk_buff *skb)
-{
- int rc = -ENOBUFS;
- struct sk_buff *nskb = llc_alloc_frame();
-
- if (nskb) {
- struct llc_opt *llc = llc_sk(sk);
- struct llc_sap *sap = llc->sap;
-
- nskb->dev = llc->dev;
- llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap,
- llc->daddr.lsap, LLC_PDU_RSP);
- llc_pdu_init_as_ua_rsp(nskb, llc->f_flag);
- rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac);
- if (rc)
- goto free;
- llc_conn_send_pdu(sk, nskb);
- }
-out:
- return rc;
-free:
- kfree_skb(nskb);
- goto out;
-}
-
int llc_conn_ac_send_ua_rsp_f_set_p(struct sock *sk, struct sk_buff *skb)
{
u8 f_bit;
* set to one if one PDU with p-bit set to one is received. Returns 0 for
* success, 1 otherwise.
*/
-int llc_conn_ac_send_i_rsp_f_set_ackpf(struct sock *sk, struct sk_buff *skb)
+static int llc_conn_ac_send_i_rsp_f_set_ackpf(struct sock *sk,
+ struct sk_buff *skb)
{
int rc;
struct llc_opt *llc = llc_sk(sk);
* if there is any. ack_pf flag indicates if a PDU has been received with
* p-bit set to one. Returns 0 for success, 1 otherwise.
*/
-int llc_conn_ac_send_rr_rsp_f_set_ackpf(struct sock *sk, struct sk_buff *skb)
+static int llc_conn_ac_send_rr_rsp_f_set_ackpf(struct sock *sk,
+ struct sk_buff *skb)
{
int rc = -ENOBUFS;
struct sk_buff *nskb = llc_alloc_frame();
* acknowledgements decreases by increasing of "npta". Returns 0 for
* success, 1 otherwise.
*/
-int llc_conn_ac_inc_npta_value(struct sock *sk, struct sk_buff *skb)
+static int llc_conn_ac_inc_npta_value(struct sock *sk, struct sk_buff *skb)
{
struct llc_opt *llc = llc_sk(sk);
return 0;
}
-int llc_conn_ac_set_p_flag_1(struct sock *sk, struct sk_buff *skb)
+static int llc_conn_ac_set_p_flag_1(struct sock *sk, struct sk_buff *skb)
{
llc_conn_set_p_flag(sk, 1);
return 0;
return 0;
}
-int llc_conn_ac_set_f_flag_p(struct sock *sk, struct sk_buff *skb)
-{
- llc_pdu_decode_pf_bit(skb, &llc_sk(sk)->f_flag);
- return 0;
-}
-
void llc_conn_pf_cycle_tmr_cb(unsigned long timeout_data)
{
struct sock *sk = (struct sock *)timeout_data;