Lines Matching defs:conf

51 #include <sys/conf.h>
109 struct ng_l2tp_sess_config conf; /* hook/session config */
155 struct ng_l2tp_config conf; /* node configuration */
178 const struct ng_l2tp_seq_config *conf);
180 const struct ng_l2tp_config *conf);
374 priv->conf.peer_win = 1;
375 priv->conf.rexmit_max = L2TP_MAX_REXMIT;
376 priv->conf.rexmit_max_to = L2TP_MAX_REXMIT_TO;
435 hpriv->conf.session_id = session_id;
436 hpriv->conf.control_dseq = L2TP_CONTROL_DSEQ;
437 hpriv->conf.enable_dseq = L2TP_ENABLE_DSEQ;
440 hash = SESSHASH(hpriv->conf.session_id);
465 struct ng_l2tp_config *const conf =
469 if (msg->header.arglen != sizeof(*conf)) {
473 conf->enabled = !!conf->enabled;
474 conf->match_id = !!conf->match_id;
475 if (priv->conf.enabled
476 && ((priv->conf.tunnel_id != 0
477 && conf->tunnel_id != priv->conf.tunnel_id)
478 || ((priv->conf.peer_id != 0
479 && conf->peer_id != priv->conf.peer_id)))) {
488 if ((error = ng_l2tp_seq_adjust(priv, conf)) != 0)
492 priv->conf = *conf;
497 struct ng_l2tp_config *conf;
499 NG_MKRESPONSE(resp, msg, sizeof(*conf), M_NOWAIT);
504 conf = (struct ng_l2tp_config *)resp->data;
505 *conf = priv->conf;
510 struct ng_l2tp_sess_config *const conf =
515 if (msg->header.arglen != sizeof(*conf)) {
521 hpriv = ng_l2tp_find_session(priv, conf->session_id);
528 hpriv->conf = *conf;
533 struct ng_l2tp_sess_config *conf;
552 NG_MKRESPONSE(resp, msg, sizeof(hpriv->conf), M_NOWAIT);
557 conf = (struct ng_l2tp_sess_config *)resp->data;
558 *conf = hpriv->conf;
616 struct ng_l2tp_seq_config *const conf =
620 if (msg->header.arglen != sizeof(*conf)) {
624 conf->ns = htons(conf->ns);
625 conf->nr = htons(conf->nr);
626 conf->rack = htons(conf->rack);
627 conf->xack = htons(conf->xack);
630 error = ng_l2tp_seq_set(priv, conf);
717 if (hpriv->conf.session_id == sid)
733 hpriv->conf.control_dseq = 0;
734 hpriv->conf.enable_dseq = 0;
765 if (!priv->conf.enabled) {
844 if (tid != priv->conf.tunnel_id &&
845 (priv->conf.match_id || tid != 0)) {
978 if (!hpriv->conf.control_dseq)
979 hpriv->conf.enable_dseq = ((hdr & L2TP_HDR_SEQ) != 0);
983 if (hpriv->conf.enable_dseq
1021 if (!priv->conf.enabled) {
1097 if (!priv->conf.enabled) {
1115 + (2 * (hpriv->conf.include_length != 0))
1116 + (4 * (hpriv->conf.enable_dseq != 0)),
1125 if (hpriv->conf.include_length) {
1130 p[i++] = priv->conf.peer_id >> 8;
1131 p[i++] = priv->conf.peer_id & 0xff;
1132 p[i++] = hpriv->conf.peer_id >> 8;
1133 p[i++] = hpriv->conf.peer_id & 0xff;
1134 if (hpriv->conf.enable_dseq) {
1186 KASSERT(priv->conf.peer_win >= 1,
1190 seq->wmax = priv->conf.peer_win;
1203 ng_l2tp_seq_set(priv_p priv, const struct ng_l2tp_seq_config *conf)
1208 if (priv->conf.enabled)
1212 if (conf->xack != conf->nr || conf->ns != conf->rack)
1216 seq->ns = conf->ns;
1217 seq->nr = conf->nr;
1218 seq->rack = conf->rack;
1219 seq->xack = conf->xack;
1228 ng_l2tp_seq_adjust(priv_p priv, const struct ng_l2tp_config *conf)
1236 if (!conf->enabled) {
1243 new_wmax = conf->peer_win;
1451 if (seq->rexmits++ >= priv->conf.rexmit_max)
1456 if (delay > priv->conf.rexmit_max_to)
1457 delay = priv->conf.rexmit_max_to;
1549 p[4] = priv->conf.peer_id >> 8;
1550 p[5] = priv->conf.peer_id & 0xff;