• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/netpfil/ipfw/

Lines Matching refs:ucfg

494 nat44_config(struct ip_fw_chain *chain, struct nat44_cfg_nat *ucfg)
504 ptr = lookup_nat_name(&chain->nat, ucfg->name);
523 ptr->id = strtol(ucfg->name, NULL, 10);
529 ptr->ip = ucfg->ip;
530 ptr->redir_cnt = ucfg->redir_cnt;
531 ptr->mode = ucfg->mode;
532 ptr->alias_port_lo = ucfg->alias_port_lo;
533 ptr->alias_port_hi = ucfg->alias_port_hi;
534 strlcpy(ptr->if_name, ucfg->if_name, sizeof(ptr->if_name));
545 add_redir_spool_cfg((char *)(ucfg + 1), ptr);
551 tcfg = lookup_nat_name(&chain->nat, ucfg->name);
577 struct nat44_cfg_nat *ucfg;
583 if (sd->valsize < (sizeof(*oh) + sizeof(*ucfg)))
592 ucfg = (struct nat44_cfg_nat *)(oh + 1);
595 if (strnlen(ucfg->name, sizeof(ucfg->name)) == sizeof(ucfg->name))
597 id = strtol(ucfg->name, &errptr, 10);
601 read = sizeof(*oh) + sizeof(*ucfg);
603 if (sd->valsize < read + ucfg->redir_cnt*sizeof(struct nat44_cfg_redir))
606 nat44_config(chain, ucfg);
658 export_nat_cfg(struct cfg_nat *ptr, struct nat44_cfg_nat *ucfg)
661 snprintf(ucfg->name, sizeof(ucfg->name), "%d", ptr->id);
662 ucfg->ip = ptr->ip;
663 ucfg->redir_cnt = ptr->redir_cnt;
664 ucfg->mode = ptr->mode;
665 ucfg->alias_port_lo = ptr->alias_port_lo;
666 ucfg->alias_port_hi = ptr->alias_port_hi;
667 strlcpy(ucfg->if_name, ptr->if_name, sizeof(ucfg->if_name));
682 struct nat44_cfg_nat *ucfg;
690 sz = sizeof(*oh) + sizeof(*ucfg);
701 ucfg = (struct nat44_cfg_nat *)(oh + 1);
704 if (strnlen(ucfg->name, sizeof(ucfg->name)) == sizeof(ucfg->name))
708 ptr = lookup_nat_name(&chain->nat, ucfg->name);
714 export_nat_cfg(ptr, ucfg);
724 ucfg->size = sz;
729 * WE've already filled in @ucfg structure with
780 struct nat44_cfg_nat *ucfg;
804 ucfg = (struct nat44_cfg_nat *)ipfw_get_sopt_space(sd,
805 sizeof(*ucfg));
806 export_nat_cfg(ptr, ucfg);
827 struct nat44_cfg_nat *ucfg;
832 sz = sizeof(*oh) + sizeof(*ucfg);
843 ucfg = (struct nat44_cfg_nat *)(oh + 1);
846 if (strnlen(ucfg->name, sizeof(ucfg->name)) == sizeof(ucfg->name))
850 ptr = lookup_nat_name(&chain->nat, ucfg->name);
861 export_nat_cfg(ptr, ucfg);
864 ucfg->size = sizeof(struct nat44_cfg_nat) + LIBALIAS_BUF_SIZE;
869 * WE've already filled in @ucfg structure with
936 struct nat44_cfg_nat *ucfg;
962 ucfg = (struct nat44_cfg_nat *)&buf[roundup2(len, 8)];
963 snprintf(ucfg->name, sizeof(ucfg->name), "%d", cfg->id);
964 strlcpy(ucfg->if_name, cfg->if_name, sizeof(ucfg->if_name));
965 ucfg->ip = cfg->ip;
966 ucfg->mode = cfg->mode;
967 ucfg->redir_cnt = cfg->redir_cnt;
974 urdir = (struct nat44_cfg_redir *)(ucfg + 1);
993 nat44_config(&V_layer3_chain, ucfg);
1029 struct cfg_nat_legacy *ucfg;
1068 ucfg = (struct cfg_nat_legacy *)&data[len];
1069 ucfg->id = n->id;
1070 ucfg->ip = n->ip;
1071 ucfg->redir_cnt = n->redir_cnt;
1072 ucfg->mode = n->mode;
1073 strlcpy(ucfg->if_name, n->if_name, sizeof(ucfg->if_name));