Deleted Added
full compact
tcp_usrreq.c (124336) tcp_usrreq.c (125680)
1/*
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94
1/*
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94
34 * $FreeBSD: head/sys/netinet/tcp_usrreq.c 124336 2004-01-10 08:53:00Z truckman $
34 * $FreeBSD: head/sys/netinet/tcp_usrreq.c 125680 2004-02-11 04:26:04Z bms $
35 */
36
37#include "opt_ipsec.h"
35 */
36
37#include "opt_ipsec.h"
38#include "opt_inet.h"
38#include "opt_inet6.h"
39#include "opt_tcpdebug.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/malloc.h>
44#include <sys/kernel.h>
45#include <sys/sysctl.h>

--- 1014 unchanged lines hidden (view full) ---

1060 splx(s);
1061 return (error);
1062 }
1063 tp = intotcpcb(inp);
1064
1065 switch (sopt->sopt_dir) {
1066 case SOPT_SET:
1067 switch (sopt->sopt_name) {
39#include "opt_inet6.h"
40#include "opt_tcpdebug.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/malloc.h>
45#include <sys/kernel.h>
46#include <sys/sysctl.h>

--- 1014 unchanged lines hidden (view full) ---

1061 splx(s);
1062 return (error);
1063 }
1064 tp = intotcpcb(inp);
1065
1066 switch (sopt->sopt_dir) {
1067 case SOPT_SET:
1068 switch (sopt->sopt_name) {
1069#ifdef TCP_SIGNATURE
1070 case TCP_SIGNATURE_ENABLE:
1071 error = sooptcopyin(sopt, &optval, sizeof optval,
1072 sizeof optval);
1073 if (error)
1074 break;
1075
1076 if (optval > 0)
1077 tp->t_flags |= TF_SIGNATURE;
1078 else
1079 tp->t_flags &= ~TF_SIGNATURE;
1080 break;
1081#endif /* TCP_SIGNATURE */
1068 case TCP_NODELAY:
1069 case TCP_NOOPT:
1070 error = sooptcopyin(sopt, &optval, sizeof optval,
1071 sizeof optval);
1072 if (error)
1073 break;
1074
1075 switch (sopt->sopt_name) {

--- 44 unchanged lines hidden (view full) ---

1120 default:
1121 error = ENOPROTOOPT;
1122 break;
1123 }
1124 break;
1125
1126 case SOPT_GET:
1127 switch (sopt->sopt_name) {
1082 case TCP_NODELAY:
1083 case TCP_NOOPT:
1084 error = sooptcopyin(sopt, &optval, sizeof optval,
1085 sizeof optval);
1086 if (error)
1087 break;
1088
1089 switch (sopt->sopt_name) {

--- 44 unchanged lines hidden (view full) ---

1134 default:
1135 error = ENOPROTOOPT;
1136 break;
1137 }
1138 break;
1139
1140 case SOPT_GET:
1141 switch (sopt->sopt_name) {
1142#ifdef TCP_SIGNATURE
1143 case TCP_SIGNATURE_ENABLE:
1144 optval = (tp->t_flags & TF_SIGNATURE) ? 1 : 0;
1145 break;
1146#endif /* TCP_SIGNATURE */
1128 case TCP_NODELAY:
1129 optval = tp->t_flags & TF_NODELAY;
1130 break;
1131 case TCP_MAXSEG:
1132 optval = tp->t_maxseg;
1133 break;
1134 case TCP_NOOPT:
1135 optval = tp->t_flags & TF_NOOPT;

--- 155 unchanged lines hidden ---
1147 case TCP_NODELAY:
1148 optval = tp->t_flags & TF_NODELAY;
1149 break;
1150 case TCP_MAXSEG:
1151 optval = tp->t_maxseg;
1152 break;
1153 case TCP_NOOPT:
1154 optval = tp->t_flags & TF_NOOPT;

--- 155 unchanged lines hidden ---