• Home
  • Raw
  • Download

Lines Matching refs:cfg

158 static int l2tp_nl_cmd_tunnel_create_get_addr(struct nlattr **attrs, struct l2tp_tunnel_cfg *cfg)  in l2tp_nl_cmd_tunnel_create_get_addr()  argument
161 cfg->local_udp_port = nla_get_u16(attrs[L2TP_ATTR_UDP_SPORT]); in l2tp_nl_cmd_tunnel_create_get_addr()
163 cfg->peer_udp_port = nla_get_u16(attrs[L2TP_ATTR_UDP_DPORT]); in l2tp_nl_cmd_tunnel_create_get_addr()
164 cfg->use_udp_checksums = nla_get_flag(attrs[L2TP_ATTR_UDP_CSUM]); in l2tp_nl_cmd_tunnel_create_get_addr()
169 cfg->local_ip6 = nla_data(attrs[L2TP_ATTR_IP6_SADDR]); in l2tp_nl_cmd_tunnel_create_get_addr()
170 cfg->peer_ip6 = nla_data(attrs[L2TP_ATTR_IP6_DADDR]); in l2tp_nl_cmd_tunnel_create_get_addr()
171 cfg->udp6_zero_tx_checksums = nla_get_flag(attrs[L2TP_ATTR_UDP_ZERO_CSUM6_TX]); in l2tp_nl_cmd_tunnel_create_get_addr()
172 cfg->udp6_zero_rx_checksums = nla_get_flag(attrs[L2TP_ATTR_UDP_ZERO_CSUM6_RX]); in l2tp_nl_cmd_tunnel_create_get_addr()
177 cfg->local_ip.s_addr = nla_get_in_addr(attrs[L2TP_ATTR_IP_SADDR]); in l2tp_nl_cmd_tunnel_create_get_addr()
178 cfg->peer_ip.s_addr = nla_get_in_addr(attrs[L2TP_ATTR_IP_DADDR]); in l2tp_nl_cmd_tunnel_create_get_addr()
191 struct l2tp_tunnel_cfg cfg = { 0, }; in l2tp_nl_cmd_tunnel_create() local
218 cfg.encap = nla_get_u16(attrs[L2TP_ATTR_ENCAP_TYPE]); in l2tp_nl_cmd_tunnel_create()
227 ret = l2tp_nl_cmd_tunnel_create_get_addr(attrs, &cfg); in l2tp_nl_cmd_tunnel_create()
233 switch (cfg.encap) { in l2tp_nl_cmd_tunnel_create()
237 peer_tunnel_id, &cfg, &tunnel); in l2tp_nl_cmd_tunnel_create()
245 ret = l2tp_tunnel_register(tunnel, net, &cfg); in l2tp_nl_cmd_tunnel_create()
529 struct l2tp_session_cfg cfg = { 0, }; in l2tp_nl_cmd_session_create() local
560 cfg.pw_type = nla_get_u16(info->attrs[L2TP_ATTR_PW_TYPE]); in l2tp_nl_cmd_session_create()
561 if (cfg.pw_type >= __L2TP_PWTYPE_MAX) { in l2tp_nl_cmd_session_create()
567 if (tunnel->version == 2 && cfg.pw_type != L2TP_PWTYPE_PPP) { in l2tp_nl_cmd_session_create()
574 cfg.l2specific_type = nla_get_u8(info->attrs[L2TP_ATTR_L2SPEC_TYPE]); in l2tp_nl_cmd_session_create()
575 if (cfg.l2specific_type != L2TP_L2SPECTYPE_DEFAULT && in l2tp_nl_cmd_session_create()
576 cfg.l2specific_type != L2TP_L2SPECTYPE_NONE) { in l2tp_nl_cmd_session_create()
581 cfg.l2specific_type = L2TP_L2SPECTYPE_DEFAULT; in l2tp_nl_cmd_session_create()
591 cfg.cookie_len = len; in l2tp_nl_cmd_session_create()
592 memcpy(&cfg.cookie[0], nla_data(info->attrs[L2TP_ATTR_COOKIE]), len); in l2tp_nl_cmd_session_create()
601 cfg.peer_cookie_len = len; in l2tp_nl_cmd_session_create()
602 memcpy(&cfg.peer_cookie[0], nla_data(info->attrs[L2TP_ATTR_PEER_COOKIE]), len); in l2tp_nl_cmd_session_create()
605 cfg.ifname = nla_data(info->attrs[L2TP_ATTR_IFNAME]); in l2tp_nl_cmd_session_create()
609 cfg.recv_seq = nla_get_u8(info->attrs[L2TP_ATTR_RECV_SEQ]); in l2tp_nl_cmd_session_create()
612 cfg.send_seq = nla_get_u8(info->attrs[L2TP_ATTR_SEND_SEQ]); in l2tp_nl_cmd_session_create()
615 cfg.lns_mode = nla_get_u8(info->attrs[L2TP_ATTR_LNS_MODE]); in l2tp_nl_cmd_session_create()
618 cfg.reorder_timeout = nla_get_msecs(info->attrs[L2TP_ATTR_RECV_TIMEOUT]); in l2tp_nl_cmd_session_create()
621 if (!l2tp_nl_cmd_ops[cfg.pw_type]) { in l2tp_nl_cmd_session_create()
623 request_module("net-l2tp-type-%u", cfg.pw_type); in l2tp_nl_cmd_session_create()
627 if (!l2tp_nl_cmd_ops[cfg.pw_type] || !l2tp_nl_cmd_ops[cfg.pw_type]->session_create) { in l2tp_nl_cmd_session_create()
632 ret = l2tp_nl_cmd_ops[cfg.pw_type]->session_create(net, tunnel, in l2tp_nl_cmd_session_create()
635 &cfg); in l2tp_nl_cmd_session_create()