Lines Matching defs:conf

53 #include <sys/conf.h>
108 struct ng_l2tp_sess_config conf; /* hook/session config */
154 struct ng_l2tp_config conf; /* node configuration */
177 const struct ng_l2tp_seq_config *conf);
179 const struct ng_l2tp_config *conf);
369 priv->conf.peer_win = 1;
370 priv->conf.rexmit_max = L2TP_MAX_REXMIT;
371 priv->conf.rexmit_max_to = L2TP_MAX_REXMIT_TO;
430 hpriv->conf.session_id = session_id;
431 hpriv->conf.control_dseq = L2TP_CONTROL_DSEQ;
432 hpriv->conf.enable_dseq = L2TP_ENABLE_DSEQ;
435 hash = SESSHASH(hpriv->conf.session_id);
460 struct ng_l2tp_config *const conf =
464 if (msg->header.arglen != sizeof(*conf)) {
468 conf->enabled = !!conf->enabled;
469 conf->match_id = !!conf->match_id;
470 if (priv->conf.enabled
471 && ((priv->conf.tunnel_id != 0
472 && conf->tunnel_id != priv->conf.tunnel_id)
473 || ((priv->conf.peer_id != 0
474 && conf->peer_id != priv->conf.peer_id)))) {
483 if ((error = ng_l2tp_seq_adjust(priv, conf)) != 0)
487 priv->conf = *conf;
492 struct ng_l2tp_config *conf;
494 NG_MKRESPONSE(resp, msg, sizeof(*conf), M_NOWAIT);
499 conf = (struct ng_l2tp_config *)resp->data;
500 *conf = priv->conf;
505 struct ng_l2tp_sess_config *const conf =
510 if (msg->header.arglen != sizeof(*conf)) {
516 hpriv = ng_l2tp_find_session(priv, conf->session_id);
523 hpriv->conf = *conf;
528 struct ng_l2tp_sess_config *conf;
547 NG_MKRESPONSE(resp, msg, sizeof(hpriv->conf), M_NOWAIT);
552 conf = (struct ng_l2tp_sess_config *)resp->data;
553 *conf = hpriv->conf;
611 struct ng_l2tp_seq_config *const conf =
615 if (msg->header.arglen != sizeof(*conf)) {
619 conf->ns = htons(conf->ns);
620 conf->nr = htons(conf->nr);
621 conf->rack = htons(conf->rack);
622 conf->xack = htons(conf->xack);
625 error = ng_l2tp_seq_set(priv, conf);
713 if (hpriv->conf.session_id == sid)
729 hpriv->conf.control_dseq = 0;
730 hpriv->conf.enable_dseq = 0;
764 if (!priv->conf.enabled) {
843 if (tid != priv->conf.tunnel_id &&
844 (priv->conf.match_id || tid != 0)) {
975 if (!hpriv->conf.control_dseq)
976 hpriv->conf.enable_dseq = ((hdr & L2TP_HDR_SEQ) != 0);
980 if (hpriv->conf.enable_dseq
1023 if (!priv->conf.enabled) {
1105 if (!priv->conf.enabled) {
1123 + (2 * (hpriv->conf.include_length != 0))
1124 + (4 * (hpriv->conf.enable_dseq != 0)),
1133 if (hpriv->conf.include_length) {
1138 p[i++] = priv->conf.peer_id >> 8;
1139 p[i++] = priv->conf.peer_id & 0xff;
1140 p[i++] = hpriv->conf.peer_id >> 8;
1141 p[i++] = hpriv->conf.peer_id & 0xff;
1142 if (hpriv->conf.enable_dseq) {
1196 KASSERT(priv->conf.peer_win >= 1,
1200 seq->wmax = priv->conf.peer_win;
1214 ng_l2tp_seq_set(priv_p priv, const struct ng_l2tp_seq_config *conf)
1219 if (priv->conf.enabled)
1223 if (conf->xack != conf->nr || conf->ns != conf->rack)
1227 seq->ns = conf->ns;
1228 seq->nr = conf->nr;
1229 seq->rack = conf->rack;
1230 seq->xack = conf->xack;
1239 ng_l2tp_seq_adjust(priv_p priv, const struct ng_l2tp_config *conf)
1245 if (!conf->enabled) {
1251 new_wmax = conf->peer_win;
1468 if (seq->rexmits++ >= priv->conf.rexmit_max)
1473 if (delay > priv->conf.rexmit_max_to)
1474 delay = priv->conf.rexmit_max_to;
1555 p[4] = priv->conf.peer_id >> 8;
1556 p[5] = priv->conf.peer_id & 0xff;