Lines Matching defs:softf
181 ipf_ftp_softc_t *softf;
183 KMALLOC(softf, ipf_ftp_softc_t *);
184 if (softf == NULL)
187 bzero((char *)softf, sizeof(*softf));
189 softf->ipf_p_ftp_debug = 0;
191 softf->ipf_p_ftp_debug = DEBUG_PARSE_ERR;
193 softf->ipf_p_ftp_forcepasv = 1;
195 softf->ipf_p_ftp_tune = ipf_tune_array_copy(softf,
198 if (softf->ipf_p_ftp_tune == NULL) {
199 ipf_p_ftp_soft_destroy(softc, softf);
202 if (ipf_tune_array_link(softc, softf->ipf_p_ftp_tune) == -1) {
203 ipf_p_ftp_soft_destroy(softc, softf);
207 return softf;
214 ipf_ftp_softc_t *softf = arg;
216 if (softf->ipf_p_ftp_tune != NULL) {
217 ipf_tune_array_unlink(softc, softf->ipf_p_ftp_tune);
218 KFREES(softf->ipf_p_ftp_tune, sizeof(ipf_ftp_tuneables));
219 softf->ipf_p_ftp_tune = NULL;
222 KFREE(softf);
282 ipf_p_ftp_port(ipf_ftp_softc_t *softf, fr_info_t *fin, ip_t *ip, nat_t *nat,
305 if (softf->ipf_p_ftp_debug & DEBUG_PARSE)
320 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
327 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
344 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
352 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
366 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
402 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
429 return ipf_p_ftp_addport(softf, fin, ip, nat, ftp, dlen, sp, inc);
434 ipf_p_ftp_addport(ipf_ftp_softc_t *softf, fr_info_t *fin, ip_t *ip, nat_t *nat,
451 if (softf->ipf_p_ftp_single_xfer != 0) {
454 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
474 if (softf->ipf_p_ftp_debug & DEBUG_SECURITY)
594 ipf_p_ftp_client(ipf_ftp_softc_t *softf, fr_info_t *fin, ip_t *ip, nat_t *nat,
648 !softf->ipf_p_ftp_pasvonly &&
650 inc = ipf_p_ftp_port(softf, fin, ip, nat, ftp, dlen);
652 !softf->ipf_p_ftp_pasvonly &&
654 inc = ipf_p_ftp_eprt(softf, fin, ip, nat, ftp, dlen);
655 } else if (softf->ipf_p_ftp_insecure &&
656 !softf->ipf_p_ftp_pasvonly &&
658 inc = ipf_p_ftp_port(softf, fin, ip, nat, ftp, dlen);
660 if (softf->ipf_p_ftp_debug & DEBUG_PARSE)
673 ipf_p_ftp_pasv(ipf_ftp_softc_t *softf, fr_info_t *fin, ip_t *ip, nat_t *nat,
683 if ((softf->ipf_p_ftp_forcepasv != 0) &&
686 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
701 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
708 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
733 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
740 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
758 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
766 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
782 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
807 return ipf_p_ftp_pasvreply(softf, fin, ip, nat, ftp, (a5 << 8 | a6),
812 ipf_p_ftp_pasvreply(ipf_ftp_softc_t *softf, fr_info_t *fin, ip_t *ip,
849 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
953 ipf_p_ftp_server(ipf_ftp_softc_t *softf, fr_info_t *fin, ip_t *ip, nat_t *nat,
970 if (softf->ipf_p_ftp_debug & DEBUG_PARSE)
975 inc = ipf_p_ftp_pasv(softf, fin, ip, nat, ftp, dlen);
977 inc = ipf_p_ftp_epsv(softf, fin, ip, nat, ftp, dlen);
984 } else if (softf->ipf_p_ftp_insecure && !strncmp(rptr, "227 ", 4)) {
985 inc = ipf_p_ftp_pasv(softf, fin, ip, nat, ftp, dlen);
986 } else if (softf->ipf_p_ftp_insecure && !strncmp(rptr, "229 ", 4)) {
987 inc = ipf_p_ftp_epsv(softf, fin, ip, nat, ftp, dlen);
1014 if (softf->ipf_p_ftp_debug & DEBUG_PARSE)
1037 ipf_p_ftp_client_valid(ipf_ftp_softc_t *softf, ftpside_t *ftps, char *buf,
1051 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
1086 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
1118 ipf_p_ftp_server_valid(ipf_ftp_softc_t *softf, ftpside_t *ftps, char *buf,
1133 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
1168 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_INFO)
1193 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_INFO)
1201 ipf_p_ftp_valid(ipf_ftp_softc_t *softf, ftpinfo_t *ftp, int side, char *buf,
1210 ret = ipf_p_ftp_client_valid(softf, ftps, buf, len);
1212 ret = ipf_p_ftp_server_valid(softf, ftps, buf, len);
1226 ipf_p_ftp_process(ipf_ftp_softc_t *softf, fr_info_t *fin, nat_t *nat,
1254 if (softf->ipf_p_ftp_debug & DEBUG_INFO)
1280 if (softf->ipf_p_ftp_debug & DEBUG_INFO)
1287 if (softf->ipf_p_ftp_debug & DEBUG_INFO)
1298 if (softf->ipf_p_ftp_debug & DEBUG_INFO) {
1315 if (softf->ipf_p_ftp_debug & DEBUG_INFO) {
1349 if (softf->ipf_p_ftp_debug & DEBUG_INFO) {
1358 if (softf->ipf_p_ftp_debug & DEBUG_ERROR) {
1369 if (softf->ipf_p_ftp_debug & DEBUG_PARSE) {
1380 if (softf->ipf_p_ftp_debug & DEBUG_ERROR) {
1405 if (softf->ipf_p_ftp_debug & DEBUG_ERROR) {
1435 if (softf->ipf_p_ftp_debug & DEBUG_PARSE)
1444 f->ftps_junk = ipf_p_ftp_valid(softf, ftp, rv, rptr,
1448 if (softf->ipf_p_ftp_debug & DEBUG_PARSE)
1455 if (softf->ipf_p_ftp_debug &
1470 f->ftps_junk = ipf_p_ftp_valid(softf, ftp, rv,
1473 if (softf->ipf_p_ftp_debug & DEBUG_PARSE) {
1485 inc += ipf_p_ftp_server(softf, fin, ip,
1488 inc += ipf_p_ftp_client(softf, fin, ip,
1503 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
1547 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_INFO) {
1567 ipf_ftp_softc_t *softf = arg;
1579 return ipf_p_ftp_process(softf, fin, nat, ftp, rev);
1586 ipf_ftp_softc_t *softf = arg;
1598 return ipf_p_ftp_process(softf, fin, nat, ftp, 1 - rev);
1634 ipf_p_ftp_eprt(ipf_ftp_softc_t *softf, fr_info_t *fin, ip_t *ip, nat_t *nat,
1644 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
1660 return ipf_p_ftp_eprt4(softf, fin, ip, nat, ftp, dlen);
1663 return ipf_p_ftp_eprt6(softf, fin, ip, nat, ftp, dlen);
1671 ipf_p_ftp_eprt4(ipf_ftp_softc_t *softf, fr_info_t *fin, ip_t *ip, nat_t *nat,
1755 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
1785 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
1809 return ipf_p_ftp_addport(softf, fin, ip, nat, ftp, dlen, port, inc);
1814 ipf_p_ftp_epsv(ipf_ftp_softc_t *softf, fr_info_t *fin, ip_t *ip, nat_t *nat,
1822 if ((softf->ipf_p_ftp_forcepasv != 0) &&
1825 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
1880 return ipf_p_ftp_pasvreply(softf, fin, ip, nat, ftp, (u_int)ap,
1886 ipf_p_ftp_eprt6(ipf_ftp_softc_t *softf, fr_info_t *fin, ip_t *ip,
1999 if (softf->ipf_p_ftp_debug & DEBUG_PARSE_ERR)
2042 if (softf->ipf_p_ftp_debug & DEBUG_ERROR)
2066 return ipf_p_ftp_addport(softf, fin, ip, nat, ftp, dlen, port, inc);