Lines Matching defs:error

689 /* Returns:     int    - value of the next header or IPPROTO_NONE if error  */
710 /* Returns: int - value of the next header or IPPROTO_NONE if error */
731 /* Returns: int - value of the next header or IPPROTO_NONE if error */
774 /* Returns: int - value of the next header or IPPROTO_NONE if error */
854 /* Returns: int - value of the next header or IPPROTO_NONE if error */
1040 /* Returns: int - value of the next header or IPPROTO_NONE if error */
1276 * ICMP error packets should not be generated for IP
1308 /* Returns: int - 0 = header ok, 1 = bad packet, -1 = buffer error */
1589 /* Returns: int - value of the next header or IPPROTO_NONE if error */
2783 /* > 0 == filter error # for packet */
3129 * Should we return an ICMP packet to indicate error
3131 * WARNING: ICMP error packets AND TCP RST packets should
3994 /* that need to be dropped before returning with an error. */
4005 int error;
4009 error = 0;
4050 error = ipf_resolvedest(softc, fr->fr_names, fdp, v);
4051 if (error != 0)
4057 error = ipf_resolvedest(softc, fr->fr_names, fdp, v);
4058 if (error != 0)
4064 error = ipf_resolvedest(softc, fr->fr_names, fdp, v);
4065 if (error != 0)
4099 return error;
4169 int error;
4172 error = COPYIN(src, &ca, sizeof(ca));
4173 if (error != 0)
4174 return error;
4178 error = COPYIN(ca, dst, size);
4179 if (error != 0) {
4181 error = EFAULT;
4183 return error;
4205 int error;
4208 error = COPYOUT(src, ca, size);
4209 if (error != 0) {
4211 error = EFAULT;
4213 return error;
4219 /* Returns: int - 0 = success, else error */
4523 int error = 0, in, family, need_free = 0;
4540 error = ipf_inobj(softc, data, NULL, fp, IPFOBJ_FRENTRY);
4541 if (error) {
4542 return error;
4554 error = ipf_inobjsz(softc, data, f, IPFOBJ_FRENTRY,
4556 if (error) {
4558 return error;
4586 error = EINVAL;
4602 error = EINVAL;
4617 error = EINVAL;
4629 error = ESRCH;
4634 error = ipf_funcinit(softc, fp);
4635 if (error != 0)
4642 error = ESRCH;
4648 error = ESRCH;
4666 error = EINVAL;
4677 error = EINVAL;
4688 error = EINVAL;
4706 error = ESRCH;
4715 error = ESRCH;
4727 error = EINVAL;
4744 error = EINVAL;
4756 error = ESRCH;
4771 error = ENOMEM;
4782 error = 0;
4784 error = COPYIN(uptr, ptr, fp->fr_dsize);
4785 if (error != 0) {
4787 error = EFAULT;
4810 error = EINVAL;
4815 error = EINVAL;
4822 * Preparation for error case at the bottom of this function.
4831 error = EINVAL;
4842 error = EINVAL;
4855 error = EINVAL;
4864 error = ESRCH;
4872 error = EINVAL;
4875 if (error != 0)
4887 error = EINVAL;
4896 error = ESRCH;
4903 error = EINVAL;
4915 error = EINVAL;
4921 error = EINVAL;
4924 if (error != 0)
4931 error = EINVAL;
4940 error = EINVAL;
4949 error = EINVAL;
4957 error = ipf_synclist(softc, fp, NULL);
4958 if (error != 0)
5002 error = ESRCH;
5020 error = ipf_outobj(softc, data, fp, IPFOBJ_FRENTRY);
5022 if (error == 0) {
5024 error = COPYOUT(f->fr_data, uptr,
5026 if (error == 0) {
5031 error = EFAULT;
5044 return error;
5095 error = ESRCH;
5103 error = EPERM;
5113 error = EBUSY;
5123 error = ipf_auth_precmd(softc, req, f, ftail);
5137 error = EEXIST;
5141 error = ipf_auth_precmd(softc, req, fp, ftail);
5178 if (need_free || (error != 0)) {
5199 return (error);
5426 /* Returns: int - 0 == success, else error */
5440 int error;
5442 error = BCOPYIN(data, &res, sizeof(res));
5443 if (error != 0) {
6095 /* Returns: int - 0 == success, -1 == error (packet should be droppped) */
6103 /* has no match in the cache, return an error. */
6213 int error = 0;
6218 error = BCOPYOUT(&softc->ipf_interror, data,
6220 if (error != 0) {
6222 error = EFAULT;
6224 return error;
6232 error = ipf_ipf_ioctl(softc, data, cmd, mode, uid, ctx);
6236 error = ipf_nat_ioctl(softc, data, cmd, mode,
6240 error = EIO;
6245 error = ipf_state_ioctl(softc, data, cmd, mode,
6249 error = EIO;
6254 error = ipf_auth_ioctl(softc, data, cmd, mode,
6258 error = EIO;
6263 error = ipf_sync_ioctl(softc, data, cmd, mode,
6266 error = EIO;
6273 error = ipf_scan_ioctl(softc, data, cmd, mode,
6278 error = EIO;
6284 error = ipf_lookup_ioctl(softc, data, cmd, mode,
6287 error = EIO;
6293 error = EIO;
6297 return error;
6361 int error;
6371 error = BCOPYIN(data, objp, sizeof(*objp));
6372 if (error != 0) {
6395 error = COPYIN(objp->ipfo_ptr, ptr, size);
6396 if (error != 0) {
6398 error = EFAULT;
6402 error = ipf_in_compat(softc, objp, ptr, 0);
6405 error = EINVAL;
6408 return error;
6435 int error;
6442 error = BCOPYIN(data, &obj, sizeof(obj));
6443 if (error != 0) {
6459 error = COPYIN(obj.ipfo_ptr, ptr, sz);
6460 if (error != 0) {
6462 error = EFAULT;
6466 error = ipf_in_compat(softc, &obj, ptr, sz);
6469 error = EINVAL;
6472 return error;
6498 int error;
6505 error = BCOPYIN(data, &obj, sizeof(obj));
6506 if (error != 0) {
6522 error = COPYOUT(ptr, obj.ipfo_ptr, sz);
6523 if (error != 0) {
6525 error = EFAULT;
6529 error = ipf_out_compat(softc, &obj, ptr);
6532 error = EINVAL;
6535 return error;
6558 int error;
6565 error = BCOPYIN(data, &obj, sizeof(obj));
6566 if (error != 0) {
6587 error = COPYOUT(ptr, obj.ipfo_ptr, obj.ipfo_size);
6588 if (error != 0) {
6590 error = EFAULT;
6594 error = ipf_out_compat(softc, &obj, ptr);
6597 error = EINVAL;
6600 return error;
6624 int error;
6643 error = COPYOUT(ptr, obj->ipfo_ptr, obj->ipfo_size);
6644 if (error != 0) {
6646 error = EFAULT;
6650 error = ipf_out_compat(softc, obj, ptr);
6653 error = EINVAL;
6656 return error;
7043 int error = 0;
7046 error = ipf_tune_add(softc, nt);
7047 if (error != 0) {
7054 return error;
7219 int error = 0;
7231 error = ESRCH;
7234 return error;
7244 /* tunables. If one entry should fail to be found, an error will be */
7255 int error = 0;
7258 error = ipf_tune_del(softc, ot);
7259 if (error != 0)
7263 return error;
7290 int error;
7292 error = ipf_inobj(softc, data, NULL, &tu, IPFOBJ_TUNEABLE);
7293 if (error != 0)
7294 return error;
7347 error = ipf_outobj(softc, data, &tu, IPFOBJ_TUNEABLE);
7357 error = ESRCH;
7362 error = 0;
7367 error = 0;
7369 if (error != 0)
7390 error = ipf_outobj(softc, data, &tu, IPFOBJ_TUNEABLE);
7403 error = EBUSY;
7410 error = EINVAL;
7418 error = (*ta->ipft_func)(softc, ta,
7438 error = ipf_outobj(softc, data, &tu, IPFOBJ_TUNEABLE);
7444 error = EINVAL;
7448 return error;
7468 int error;
7470 error = ipf_inobj(softc, data, &obj, &fio, IPFOBJ_IPFSTAT);
7471 if (error != 0)
7472 return error;
7474 error = ipf_outobj(softc, data, &fio, IPFOBJ_IPFSTAT);
7475 if (error != 0)
7476 return error;
7623 /* Returns: int - 0 = success, else error */
7643 int error;
7646 error = ESRCH;
7654 error = 0;
7660 return error;
7896 /* Returns: int - 0 = success, else error */
7917 int error, out;
7929 error = ipf_inobj(softc, ptr, &obj, &it, IPFOBJ_IPFITER);
7930 if (error != 0)
7931 return error;
8019 error = ipf_outobjk(softc, &obj, next);
8020 if (error == 0 && t->ipt_data != NULL) {
8032 error = ipf_outobjk(softc, &dobj, next->fr_data);
8039 return error;
8045 /* Returns: int - 0 = success, else error */
8064 int error;
8068 error = ipf_getnextrule(softc, token, data);
8073 error = ipf_inobj(softc, data, &obj, &it, IPFOBJ_IPFITER);
8074 if (error != 0)
8075 return error;
8077 error = ipf_outobj(softc, data, &it, IPFOBJ_IPFITER);
8080 return error;
8086 /* Returns: int - 0 = success, else error */
8100 int error;
8105 error = ipf_frag_pkt_next(softc, token, itp);
8109 error = EINVAL;
8113 return error;
8119 /* Returns: int - 0 = success, else error */
8135 int error;
8137 error = ipf_inobj(softc, data, NULL, &iter, IPFOBJ_GENITER);
8138 if (error != 0)
8139 return error;
8144 error = ipf_geniter(softc, token, &iter);
8150 error = 0;
8153 return error;
8159 /* Returns: int - 0 = success, else error */
8179 int error, tmp;
8188 error = EPERM;
8190 error = BCOPYIN(data, &tmp, sizeof(tmp));
8191 if (error != 0) {
8193 error = EFAULT;
8200 error = 0;
8202 error = ipfattach(softc);
8203 if (error == 0)
8209 error = ipfdetach(softc);
8211 error = 0;
8212 if (error == 0)
8222 error = EPERM;
8228 error = ipf_ipftune(softc, cmd, (void *)data);
8234 error = EPERM;
8236 error = BCOPYIN(data, &softc->ipf_flags,
8238 if (error != 0) {
8240 error = EFAULT;
8246 error = BCOPYOUT(&softc->ipf_flags, data,
8248 if (error != 0) {
8250 error = EFAULT;
8255 error = ipf_resolvefunc(softc, (void *)data);
8264 error = EPERM;
8266 error = frrequest(softc, IPL_LOGIPF, cmd, (caddr_t)data,
8276 error = EPERM;
8278 error = frrequest(softc, IPL_LOGIPF, cmd, (caddr_t)data,
8286 error = EPERM;
8289 error = BCOPYOUT(&softc->ipf_active, data,
8291 if (error != 0) {
8293 error = EFAULT;
8302 error = ipf_inobj(softc, (void *)data, &obj, &fio,
8304 if (error != 0)
8307 error = ipf_outobj(softc, (void *)data, &fio, IPFOBJ_IPFSTAT);
8313 error = EPERM;
8315 error = ipf_zerostats(softc, (caddr_t)data);
8321 error = EPERM;
8323 error = BCOPYIN(data, &tmp, sizeof(tmp));
8324 if (!error) {
8326 error = BCOPYOUT(&tmp, data, sizeof(tmp));
8327 if (error != 0) {
8329 error = EFAULT;
8333 error = EFAULT;
8342 error = EPERM;
8344 error = BCOPYIN(data, &tmp, sizeof(tmp));
8345 if (!error) {
8347 error = BCOPYOUT(&tmp, data, sizeof(tmp));
8348 if (error != 0) {
8350 error = EFAULT;
8354 error = EFAULT;
8363 error = EPERM;
8365 error = BCOPYIN(data, &tmp, sizeof(tmp));
8366 if (error == 0) {
8373 error = EFAULT;
8382 error = EPERM;
8385 error = BCOPYOUT(&tmp, data, sizeof(tmp));
8386 if (error) {
8388 error = EFAULT;
8397 error = EPERM;
8401 error = ipfsync();
8404 error = 0;
8412 error = ipf_outobj(softc, (void *)data,
8420 error = BCOPYOUT(&tmp, data, sizeof(tmp));
8426 error = ipf_frruleiter(softc, data, uid, ctx);
8432 error = ipf_genericiter(softc, data, uid, ctx);
8437 error = BCOPYIN(data, &tmp, sizeof(tmp));
8438 if (error == 0) {
8440 error = ipf_token_del(softc, tmp, uid, ctx);
8447 error = EINVAL;
8451 return error;
8517 /* This is really heavy weight and lots of room for error, */
8658 /* Returns: int - 0 = success, else error */
8679 int arraysize, *array, error;
8683 error = BCOPYIN(data, objp, sizeof(*objp));
8684 if (error != 0) {
8707 error = COPYIN(objp->ipfo_ptr, array, arraysize);
8708 if (error != 0) {