summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2021-02-24 18:15:08 -0500
committerDan McDonald <danmcd@joyent.com>2021-02-24 18:15:08 -0500
commit30e46d865c328134f725b0f2a58f9ce75e7f5c21 (patch)
tree9c65c93139e034c4ad2a3926be8bd3ddad3fcf85
parent9c82270494990a5542438960f9fc2de90d84255e (diff)
parent64410b34750c079390ce58d7e159fcff545d09b0 (diff)
downloadillumos-joyent-30e46d865c328134f725b0f2a58f9ce75e7f5c21.tar.gz
[illumos-gate merge]
commit 64410b34750c079390ce58d7e159fcff545d09b0 13543 ipf: symbol 'thishost' is multiply-defined commit cfc9ef1dcc5d6a18778b3b10d738d19df873d1a3 13545 fm: multiply-defined symbols commit 1e094e1b56a6d925d6f7db6fec39db1c0e16451f 13547 tip: multiply-defined symbols commit d75c60626217c1d02658d48c8cabf81bd44c6729 13449 cxgbe IPv6 checksum and LSO support commit 67ba9ac97cfcbc2368432da6d6d5cc1eb888fda3 13554 vnics should advertise IPv6 checksums
-rw-r--r--usr/src/cmd/fm/eversholt/common/esclex.c6
-rw-r--r--usr/src/cmd/fm/eversholt/common/esclex.h14
-rw-r--r--usr/src/cmd/fm/eversholt/common/tree.c24
-rw-r--r--usr/src/cmd/fm/eversholt/common/tree.h38
-rw-r--r--usr/src/cmd/fm/modules/common/eversholt/fme.c4
-rw-r--r--usr/src/cmd/fm/modules/common/eversholt/fme.h4
-rw-r--r--usr/src/cmd/fm/modules/common/eversholt/platform.h2
-rw-r--r--usr/src/cmd/ipf/tools/ipnat.c135
-rw-r--r--usr/src/cmd/tip/aculib/v831.c3
-rw-r--r--usr/src/cmd/tip/cmds.c14
-rw-r--r--usr/src/cmd/tip/cu.c4
-rw-r--r--usr/src/cmd/tip/hunt.c3
-rw-r--r--usr/src/cmd/tip/remcap.c5
-rw-r--r--usr/src/cmd/tip/remote.c32
-rw-r--r--usr/src/cmd/tip/tip.c4
-rw-r--r--usr/src/cmd/tip/tip.h172
-rw-r--r--usr/src/cmd/tip/tipout.c3
-rw-r--r--usr/src/uts/common/io/cxgbe/t4nex/t4_mac.c8
-rw-r--r--usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c31
-rw-r--r--usr/src/uts/common/io/vnic/vnic_dev.c4
20 files changed, 281 insertions, 229 deletions
diff --git a/usr/src/cmd/fm/eversholt/common/esclex.c b/usr/src/cmd/fm/eversholt/common/esclex.c
index 44555c7785..59904a5dc1 100644
--- a/usr/src/cmd/fm/eversholt/common/esclex.c
+++ b/usr/src/cmd/fm/eversholt/common/esclex.c
@@ -51,6 +51,12 @@
#include "check.h"
#include "y.tab.h"
+struct lut *Dicts;
+struct lut *Ident;
+struct lut *Timesuffixlut;
+int Pragma_trust_ereports;
+int Pragma_new_errors_only;
+
/* ridiculously long token buffer -- disallow any token longer than this */
#define MAXTOK 8192
static char Tok[MAXTOK];
diff --git a/usr/src/cmd/fm/eversholt/common/esclex.h b/usr/src/cmd/fm/eversholt/common/esclex.h
index 4971527a5a..8b2636d2ba 100644
--- a/usr/src/cmd/fm/eversholt/common/esclex.h
+++ b/usr/src/cmd/fm/eversholt/common/esclex.h
@@ -38,8 +38,6 @@
#ifndef _ESC_COMMON_ESCLEX_H
#define _ESC_COMMON_ESCLEX_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -58,18 +56,18 @@ const unsigned long long *lex_s2ullp_lut_lookup(struct lut *root,
const char *s);
/* lut containing "ident" strings */
-struct lut *Ident;
+extern struct lut *Ident;
/* lut containing "dictionary" strings */
-struct lut *Dicts;
+extern struct lut *Dicts;
/* lut containing valid timeval suffixes */
-struct lut *Timesuffixlut;
+extern struct lut *Timesuffixlut;
/* flags set by #pragmas */
-int Pragma_new_errors_only;
-int Pragma_trust_ereports;
-int Pragma_allow_cycles;
+extern int Pragma_new_errors_only;
+extern int Pragma_trust_ereports;
+extern int Pragma_allow_cycles;
/* exported by esclex.c but names are mandated by the way yacc works... */
int yylex();
diff --git a/usr/src/cmd/fm/eversholt/common/tree.c b/usr/src/cmd/fm/eversholt/common/tree.c
index 72c5f23f0b..adbb677c9f 100644
--- a/usr/src/cmd/fm/eversholt/common/tree.c
+++ b/usr/src/cmd/fm/eversholt/common/tree.c
@@ -29,8 +29,6 @@
* routines for semantic checking.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -47,8 +45,26 @@
#include "check.h"
#include "ptree.h"
-static struct node *Root;
+struct lut *Faults;
+struct lut *Upsets;
+struct lut *Defects;
+struct lut *Errors;
+struct lut *Ereports;
+struct lut *Ereportenames;
+struct lut *Ereportenames_discard;
+struct lut *SERDs;
+struct lut *STATs;
+struct lut *ASRUs;
+struct lut *FRUs;
+struct lut *Configs;
+struct node *Props;
+struct node *Lastprops;
+struct node *Masks;
+struct node *Lastmasks;
+struct node *Problems;
+struct node *Lastproblems;
+static struct node *Root;
static char *Newname;
static struct stats *Faultcount;
@@ -318,7 +334,7 @@ tree_free(struct node *root)
static int
tree_treecmp(struct node *np1, struct node *np2, enum nodetype t,
- lut_cmp cmp_func)
+ lut_cmp cmp_func)
{
if (np1 == NULL || np2 == NULL)
return (0);
diff --git a/usr/src/cmd/fm/eversholt/common/tree.h b/usr/src/cmd/fm/eversholt/common/tree.h
index f28b3286d2..986aa159ca 100644
--- a/usr/src/cmd/fm/eversholt/common/tree.h
+++ b/usr/src/cmd/fm/eversholt/common/tree.h
@@ -32,8 +32,6 @@
#ifndef _ESC_COMMON_TREE_H
#define _ESC_COMMON_TREE_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -316,24 +314,24 @@ void tree_report();
int tree_namecmp(struct node *np1, struct node *np2);
int tree_eventcmp(struct node *np1, struct node *np2);
-struct lut *Faults;
-struct lut *Upsets;
-struct lut *Defects;
-struct lut *Errors;
-struct lut *Ereports;
-struct lut *Ereportenames;
-struct lut *Ereportenames_discard;
-struct lut *SERDs;
-struct lut *STATs;
-struct lut *ASRUs;
-struct lut *FRUs;
-struct lut *Configs;
-struct node *Props;
-struct node *Lastprops;
-struct node *Masks;
-struct node *Lastmasks;
-struct node *Problems;
-struct node *Lastproblems;
+extern struct lut *Faults;
+extern struct lut *Upsets;
+extern struct lut *Defects;
+extern struct lut *Errors;
+extern struct lut *Ereports;
+extern struct lut *Ereportenames;
+extern struct lut *Ereportenames_discard;
+extern struct lut *SERDs;
+extern struct lut *STATs;
+extern struct lut *ASRUs;
+extern struct lut *FRUs;
+extern struct lut *Configs;
+extern struct node *Props;
+extern struct node *Lastprops;
+extern struct node *Masks;
+extern struct node *Lastmasks;
+extern struct node *Problems;
+extern struct node *Lastproblems;
#ifdef __cplusplus
}
diff --git a/usr/src/cmd/fm/modules/common/eversholt/fme.c b/usr/src/cmd/fm/modules/common/eversholt/fme.c
index 0f7edab994..4914902da5 100644
--- a/usr/src/cmd/fm/modules/common/eversholt/fme.c
+++ b/usr/src/cmd/fm/modules/common/eversholt/fme.c
@@ -56,6 +56,10 @@
#include "platform.h"
#include "esclex.h"
+struct lut *Istats;
+struct lut *SerdEngines;
+nvlist_t *Action_nvl;
+
/* imported from eft.c... */
extern hrtime_t Hesitate;
extern char *Serd_Override;
diff --git a/usr/src/cmd/fm/modules/common/eversholt/fme.h b/usr/src/cmd/fm/modules/common/eversholt/fme.h
index 5823a2170a..378e9d25cb 100644
--- a/usr/src/cmd/fm/modules/common/eversholt/fme.h
+++ b/usr/src/cmd/fm/modules/common/eversholt/fme.h
@@ -85,8 +85,8 @@ extern "C" {
#define WOBUF_ISTATS "istats"
#define WOBUF_SERDS "serds"
-struct lut *Istats; /* instanced stats a la "count=" */
-struct lut *SerdEngines;
+extern struct lut *Istats; /* instanced stats a la "count=" */
+extern struct lut *SerdEngines;
struct fme;
diff --git a/usr/src/cmd/fm/modules/common/eversholt/platform.h b/usr/src/cmd/fm/modules/common/eversholt/platform.h
index 23e1f6f41e..fcccf50cb5 100644
--- a/usr/src/cmd/fm/modules/common/eversholt/platform.h
+++ b/usr/src/cmd/fm/modules/common/eversholt/platform.h
@@ -38,7 +38,7 @@ extern "C" {
#include <fm/fmd_api.h>
#include <fm/libtopo.h>
-nvlist_t *Action_nvl; /* nvl for problem with action=... prop on it */
+extern nvlist_t *Action_nvl; /* nvl for problem with action=... prop on it */
void platform_init(void);
void platform_fini(void);
diff --git a/usr/src/cmd/ipf/tools/ipnat.c b/usr/src/cmd/ipf/tools/ipnat.c
index 941765eb43..2c201f3a96 100644
--- a/usr/src/cmd/ipf/tools/ipnat.c
+++ b/usr/src/cmd/ipf/tools/ipnat.c
@@ -27,14 +27,14 @@
#include <unistd.h>
#include <stddef.h>
#include <sys/file.h>
-#define _KERNEL
+#define _KERNEL
#include <sys/uio.h>
#undef _KERNEL
#include <sys/socket.h>
#include <sys/ioctl.h>
#if defined(sun) && (defined(__svr4__) || defined(__SVR4))
-# include <sys/ioccom.h>
-# include <sys/sysmacros.h>
+#include <sys/ioccom.h>
+#include <sys/sysmacros.h>
#endif
#include <netinet/in.h>
#include <netinet/in_systm.h>
@@ -42,7 +42,7 @@
#include <netinet/tcp.h>
#include <net/if.h>
#if __FreeBSD_version >= 300000
-# include <net/if_var.h>
+#include <net/if_var.h>
#endif
#include <netdb.h>
#include <arpa/nameser.h>
@@ -50,9 +50,9 @@
#include <resolv.h>
#include <ctype.h>
#if defined(linux)
-# include <linux/a.out.h>
+#include <linux/a.out.h>
#else
-# include <nlist.h>
+#include <nlist.h>
#endif
#include "ipf.h"
#include "netinet/ipl.h"
@@ -60,34 +60,25 @@
#include "ipfzone.h"
#ifdef __hpux
-# define nlist nlist64
+#define nlist nlist64
#endif
#if defined(sun) && !SOLARIS2
-# define STRERROR(x) sys_errlist[x]
+#define STRERROR(x) sys_errlist[x]
extern char *sys_errlist[];
#else
-# define STRERROR(x) strerror(x)
+#define STRERROR(x) strerror(x)
#endif
-#if !defined(lint)
-static const char sccsid[] ="@(#)ipnat.c 1.9 6/5/96 (C) 1993 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ipnat.c,v 1.24.2.2 2005/05/10 21:19:30 darrenr Exp $";
-#endif
-
-
-#ifdef SOLARIS
-#define bzero(a,b) memset(a,0,b)
-#endif
int use_inet6 = 0;
-char thishost[MAXHOSTNAMELEN];
+extern char thishost[MAXHOSTNAMELEN];
extern char *optarg;
void dostats __P((int, natstat_t *, int, int));
void flushtable __P((int, int));
void usage __P((char *));
-int main __P((int, char*[]));
+int main __P((int, char *[]));
void showhostmap __P((natstat_t *nsp));
void natstat_dead __P((natstat_t *, char *));
void dostats_live __P((int, natstat_t *, int));
@@ -95,8 +86,8 @@ void showhostmap_live __P((int, natstat_t *));
int opts;
-void usage(name)
-char *name;
+void
+usage(char *name)
{
fprintf(stderr, "Usage: %s [-CdFhlnrRsv] [-f filename]", name);
fprintf(stderr, " [-G|-z zonename]\n");
@@ -104,9 +95,8 @@ char *name;
}
-int main(argc, argv)
-int argc;
-char *argv[];
+int
+main(int argc, char *argv[])
{
char *file, *core, *kernel;
natstat_t ns, *nsp;
@@ -122,8 +112,7 @@ char *argv[];
mode = O_RDWR;
while ((c = getopt(argc, argv, "CdFf:G:hlM:N:nrRsvz:")) != -1)
- switch (c)
- {
+ switch (c) {
case 'C' :
opts |= OPT_CLEAR;
break;
@@ -140,7 +129,7 @@ char *argv[];
setzonename_global(optarg);
break;
case 'h' :
- opts |=OPT_HITS;
+ opts |= OPT_HITS;
break;
case 'l' :
opts |= OPT_LIST;
@@ -183,7 +172,7 @@ char *argv[];
(void) setreuid(getuid(), getuid());
}
- bzero((char *)&ns, sizeof(ns));
+ bzero((char *)&ns, sizeof (ns));
if ((opts & OPT_DONOTHING) == 0) {
if (checkrev(IPL_NAME) == -1) {
@@ -201,7 +190,7 @@ char *argv[];
if (((fd = open(IPNAT_NAME, mode)) == -1) &&
((fd = open(IPNAT_NAME, O_RDONLY)) == -1)) {
(void) fprintf(stderr, "%s: open: %s\n", IPNAT_NAME,
- STRERROR(errno));
+ STRERROR(errno));
exit(1);
}
@@ -210,9 +199,9 @@ char *argv[];
exit(1);
}
- bzero((char *)&obj, sizeof(obj));
+ bzero((char *)&obj, sizeof (obj));
obj.ipfo_rev = IPFILTER_VERSION;
- obj.ipfo_size = sizeof(*nsp);
+ obj.ipfo_size = sizeof (*nsp);
obj.ipfo_type = IPFOBJ_NATSTAT;
obj.ipfo_ptr = (void *)nsp;
if (ioctl(fd, SIOCGNATS, &obj) == -1) {
@@ -238,7 +227,7 @@ char *argv[];
}
if (opts & (OPT_LIST|OPT_STAT))
dostats(fd, nsp, opts, 1);
- return 0;
+ return (0);
}
@@ -246,9 +235,8 @@ char *argv[];
* Read NAT statistic information in using a symbol table and memory file
* rather than doing ioctl's.
*/
-void natstat_dead(nsp, kernel)
-natstat_t *nsp;
-char *kernel;
+void
+natstat_dead(natstat_t *nsp, char *kernel)
{
struct nlist nat_nlist[10] = {
{ "nat_table" }, /* 0 */
@@ -274,35 +262,34 @@ char *kernel;
* for us, before returning it to userland, so here we must copy each
* one in individually.
*/
- kmemcpy((char *)&tables, nat_nlist[0].n_value, sizeof(tables));
+ kmemcpy((char *)&tables, nat_nlist[0].n_value, sizeof (tables));
nsp->ns_table[0] = tables[0];
nsp->ns_table[1] = tables[1];
kmemcpy((char *)&nsp->ns_list, nat_nlist[1].n_value,
- sizeof(nsp->ns_list));
+ sizeof (nsp->ns_list));
kmemcpy((char *)&nsp->ns_maptable, nat_nlist[2].n_value,
- sizeof(nsp->ns_maptable));
+ sizeof (nsp->ns_maptable));
kmemcpy((char *)&nsp->ns_nattab_sz, nat_nlist[3].n_value,
- sizeof(nsp->ns_nattab_sz));
+ sizeof (nsp->ns_nattab_sz));
kmemcpy((char *)&nsp->ns_rultab_sz, nat_nlist[4].n_value,
- sizeof(nsp->ns_rultab_sz));
+ sizeof (nsp->ns_rultab_sz));
kmemcpy((char *)&nsp->ns_rdrtab_sz, nat_nlist[5].n_value,
- sizeof(nsp->ns_rdrtab_sz));
+ sizeof (nsp->ns_rdrtab_sz));
kmemcpy((char *)&nsp->ns_hostmap_sz, nat_nlist[6].n_value,
- sizeof(nsp->ns_hostmap_sz));
+ sizeof (nsp->ns_hostmap_sz));
kmemcpy((char *)&nsp->ns_instances, nat_nlist[7].n_value,
- sizeof(nsp->ns_instances));
+ sizeof (nsp->ns_instances));
kmemcpy((char *)&nsp->ns_apslist, nat_nlist[8].n_value,
- sizeof(nsp->ns_apslist));
+ sizeof (nsp->ns_apslist));
}
/*
* Display NAT statistics.
*/
-void dostats(fd, nsp, opts, alive)
-natstat_t *nsp;
-int fd, opts, alive;
+void
+dostats(int fd, natstat_t *nsp, int opts, int alive)
{
nat_t *np, nat;
ipnat_t ipn;
@@ -312,17 +299,17 @@ int fd, opts, alive;
*/
if (opts & OPT_STAT) {
printf("mapped\tin\t%lu\tout\t%lu\n",
- nsp->ns_mapped[0], nsp->ns_mapped[1]);
+ nsp->ns_mapped[0], nsp->ns_mapped[1]);
printf("added\t%lu\texpired\t%lu\n",
- nsp->ns_added, nsp->ns_expire);
+ nsp->ns_added, nsp->ns_expire);
printf("no memory\t%lu\tbad nat\t%lu\n",
- nsp->ns_memfail, nsp->ns_badnat);
+ nsp->ns_memfail, nsp->ns_badnat);
printf("inuse\t%lu\norphans\t%u\nrules\t%lu\n",
- nsp->ns_inuse, nsp->ns_orphans, nsp->ns_rules);
+ nsp->ns_inuse, nsp->ns_orphans, nsp->ns_rules);
printf("wilds\t%u\n", nsp->ns_wilds);
if (opts & OPT_VERBOSE)
printf("table %p list %p\n",
- nsp->ns_table, nsp->ns_list);
+ nsp->ns_table, nsp->ns_list);
}
/*
@@ -336,7 +323,7 @@ int fd, opts, alive;
printf("List of active MAP/Redirect filters:\n");
while (nsp->ns_list) {
if (kmemcpy((char *)&ipn, (long)nsp->ns_list,
- sizeof(ipn))) {
+ sizeof (ipn))) {
perror("kmemcpy");
break;
}
@@ -349,7 +336,7 @@ int fd, opts, alive;
printf("\nList of active sessions:\n");
for (np = nsp->ns_instances; np; np = nat.nat_next) {
- if (kmemcpy((char *)&nat, (long)np, sizeof(nat)))
+ if (kmemcpy((char *)&nat, (long)np, sizeof (nat)))
break;
printactivenat(&nat, opts, 0);
if (nat.nat_aps)
@@ -365,22 +352,22 @@ int fd, opts, alive;
/*
* Display the active host mapping table.
*/
-void showhostmap(nsp)
-natstat_t *nsp;
+void
+showhostmap(natstat_t *nsp)
{
hostmap_t hm, *hmp, **maptable;
- u_int hv;
+ uint_t hv;
printf("\nList of active host mappings:\n");
- maptable = (hostmap_t **)malloc(sizeof(hostmap_t *) *
- nsp->ns_hostmap_sz);
+ maptable = (hostmap_t **)malloc(sizeof (hostmap_t *) *
+ nsp->ns_hostmap_sz);
if (maptable == NULL) {
perror("malloc");
exit(1);
}
- if (kmemcpy((char *)maptable, (u_long)nsp->ns_maptable,
- sizeof(hostmap_t *) * nsp->ns_hostmap_sz)) {
+ if (kmemcpy((char *)maptable, (ulong_t)nsp->ns_maptable,
+ sizeof (hostmap_t *) * nsp->ns_hostmap_sz)) {
perror("kmemcpy (maptable)");
return;
}
@@ -389,7 +376,7 @@ natstat_t *nsp;
hmp = maptable[hv];
while (hmp) {
- if (kmemcpy((char *)&hm, (u_long)hmp, sizeof(hm))) {
+ if (kmemcpy((char *)&hm, (ulong_t)hmp, sizeof (hm))) {
perror("kmemcpy (hostmap)");
return;
}
@@ -406,8 +393,8 @@ natstat_t *nsp;
* Issue an ioctl to flush either the NAT rules table or the active mapping
* table or both.
*/
-void flushtable(fd, opts)
-int fd, opts;
+void
+flushtable(int fd, int opts)
{
int n = 0;
@@ -431,19 +418,18 @@ int fd, opts;
/*
* Display NAT statistics.
*/
-void dostats_live(fd, nsp, opts)
-natstat_t *nsp;
-int fd, opts;
+void
+dostats_live(int fd, natstat_t *nsp, int opts)
{
ipfgeniter_t iter;
ipfobj_t obj;
ipnat_t ipn;
nat_t nat;
- bzero((char *)&obj, sizeof(obj));
+ bzero((char *)&obj, sizeof (obj));
obj.ipfo_rev = IPFILTER_VERSION;
obj.ipfo_type = IPFOBJ_GENITER;
- obj.ipfo_size = sizeof(iter);
+ obj.ipfo_size = sizeof (iter);
obj.ipfo_ptr = &iter;
iter.igi_type = IPFGENITER_IPNAT;
@@ -485,18 +471,17 @@ int fd, opts;
/*
* Display the active host mapping table.
*/
-void showhostmap_live(fd, nsp)
-int fd;
-natstat_t *nsp;
+void
+showhostmap_live(int fd, natstat_t *nsp)
{
hostmap_t hm, *hmp;
ipfgeniter_t iter;
ipfobj_t obj;
- bzero((char *)&obj, sizeof(obj));
+ bzero((char *)&obj, sizeof (obj));
obj.ipfo_rev = IPFILTER_VERSION;
obj.ipfo_type = IPFOBJ_GENITER;
- obj.ipfo_size = sizeof(iter);
+ obj.ipfo_size = sizeof (iter);
obj.ipfo_ptr = &iter;
iter.igi_type = IPFGENITER_HOSTMAP;
diff --git a/usr/src/cmd/tip/aculib/v831.c b/usr/src/cmd/tip/aculib/v831.c
index eee2763cce..dc4abc9221 100644
--- a/usr/src/cmd/tip/aculib/v831.c
+++ b/usr/src/cmd/tip/aculib/v831.c
@@ -9,8 +9,6 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Routines for dialing up on Vadic 831
*/
@@ -18,6 +16,7 @@
#include "tip.h"
+int AC;
static char dialit(char *, char *);
static char *sanitize(char *);
static void alarmtr(void);
diff --git a/usr/src/cmd/tip/cmds.c b/usr/src/cmd/tip/cmds.c
index bc3c6c59d3..cfea2c6c82 100644
--- a/usr/src/cmd/tip/cmds.c
+++ b/usr/src/cmd/tip/cmds.c
@@ -9,8 +9,6 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "tip.h"
#include <limits.h>
#ifdef USG
@@ -25,8 +23,20 @@
* miscellaneous commands
*/
+struct termios arg;
+struct termios defarg;
+int FD;
+int fildes[2];
+int repdes[2];
+int pid;
+int sfd;
+int stoprompt;
+int timedout;
int quant[] = { 60, 60, 24 };
+char copyname[80];
+char fname[80];
+char ccc;
char null = '\0';
char *sep[] = { "second", "minute", "hour" };
static char *argv[10]; /* argument vector for take and put */
diff --git a/usr/src/cmd/tip/cu.c b/usr/src/cmd/tip/cu.c
index fb911d64bd..7dc15e6ddd 100644
--- a/usr/src/cmd/tip/cu.c
+++ b/usr/src/cmd/tip/cu.c
@@ -9,10 +9,10 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "tip.h"
+int gid, egid;
+int uid, euid;
void cleanup(void);
void timeout(void);
diff --git a/usr/src/cmd/tip/hunt.c b/usr/src/cmd/tip/hunt.c
index f6280c2834..f06f6149bc 100644
--- a/usr/src/cmd/tip/hunt.c
+++ b/usr/src/cmd/tip/hunt.c
@@ -9,10 +9,9 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "tip.h"
+char *uucplock;
static sigjmp_buf deadline;
static int deadfl;
diff --git a/usr/src/cmd/tip/remcap.c b/usr/src/cmd/tip/remcap.c
index 5159d8b4e2..cc176650fa 100644
--- a/usr/src/cmd/tip/remcap.c
+++ b/usr/src/cmd/tip/remcap.c
@@ -9,8 +9,6 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* remcap - routines for dealing with the remote host data base
*
@@ -28,6 +26,7 @@
#include <string.h>
#include <unistd.h>
#include <ctype.h>
+#include "tip.h"
#ifndef BUFSIZ
#define BUFSIZ 1024
@@ -45,8 +44,6 @@
#define V_TERMCAP "REMOTE"
#define V_TERM "HOST"
-char *RM;
-
/*
* termcap - routines for dealing with the terminal capability data base
*
diff --git a/usr/src/cmd/tip/remote.c b/usr/src/cmd/tip/remote.c
index 3dbe742ed4..8e29f6b311 100644
--- a/usr/src/cmd/tip/remote.c
+++ b/usr/src/cmd/tip/remote.c
@@ -9,10 +9,38 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "tip.h"
+char *DV; /* UNIX device(s) to open */
+char *EL; /* chars marking an EOL */
+char *CM; /* initial connection message */
+char *IE; /* EOT to expect on input */
+char *OE; /* EOT to send to complete FT */
+char *CU; /* call unit if making a phone call */
+char *AT; /* acu type */
+char *PN; /* phone number(s) */
+char *DI; /* disconnect string */
+char *PA; /* parity to be generated */
+
+char *PH; /* phone number file */
+char *RM; /* remote file name */
+char *HO; /* host name */
+
+int BR; /* line speed for conversation */
+int FS; /* frame size for transfers */
+char DU; /* this host is dialed up */
+char HW; /* this device is hardwired, see hunt.c */
+char *ES; /* escape character */
+char *EX; /* exceptions */
+char *FO; /* force (literal next) char */
+char *RC; /* raise character */
+char *RE; /* script record file */
+char *PR; /* remote prompt */
+int DL; /* line delay for file transfers to remote */
+int CL; /* char delay for file transfers to remote */
+int ET; /* echocheck timeout */
+int DB; /* dialback - ignore hangup */
+
/*
* Attributes to be gleened from remote host description
* data base.
diff --git a/usr/src/cmd/tip/tip.c b/usr/src/cmd/tip/tip.c
index 9f06d66955..c18a51ba79 100644
--- a/usr/src/cmd/tip/tip.c
+++ b/usr/src/cmd/tip/tip.c
@@ -19,6 +19,10 @@
#include <sys/wait.h>
#include <locale.h>
+int vflag;
+int cumode;
+FILE *phfd;
+
/*
* Baud rate mapping table
*/
diff --git a/usr/src/cmd/tip/tip.h b/usr/src/cmd/tip/tip.h
index 4f90edaeb1..e59b8846eb 100644
--- a/usr/src/cmd/tip/tip.h
+++ b/usr/src/cmd/tip/tip.h
@@ -11,8 +11,6 @@
#ifndef _TIP_H
#define _TIP_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* tip - terminal interface program
*/
@@ -49,49 +47,47 @@ typedef void (*sig_handler_t)(int); /* works on BSD and SV */
/*
* Remote host attributes
*/
-char *DV; /* UNIX device(s) to open */
-char *EL; /* chars marking an EOL */
-char *CM; /* initial connection message */
-char *IE; /* EOT to expect on input */
-char *OE; /* EOT to send to complete FT */
-char *CU; /* call unit if making a phone call */
-char *AT; /* acu type */
-char *PN; /* phone number(s) */
-char *DI; /* disconnect string */
-char *PA; /* parity to be generated */
-
-char *PH; /* phone number file */
-char *RM; /* remote file name */
-char *HO; /* host name */
-
-int BR; /* line speed for conversation */
-int FS; /* frame size for transfers */
-
-signed char DU; /* this host is dialed up */
-char HW; /* this device is hardwired, see hunt.c */
-char *ES; /* escape character */
-char *EX; /* exceptions */
-char *FO; /* force (literal next) char */
-char *RC; /* raise character */
-char *RE; /* script record file */
-char *PR; /* remote prompt */
-int DL; /* line delay for file transfers to remote */
-int CL; /* char delay for file transfers to remote */
-int ET; /* echocheck timeout */
-int DB; /* dialback - ignore hangup */
+extern char *DV; /* UNIX device(s) to open */
+extern char *EL; /* chars marking an EOL */
+extern char *CM; /* initial connection message */
+extern char *IE; /* EOT to expect on input */
+extern char *OE; /* EOT to send to complete FT */
+extern char *CU; /* call unit if making a phone call */
+extern char *AT; /* acu type */
+extern char *PN; /* phone number(s) */
+extern char *DI; /* disconnect string */
+extern char *PA; /* parity to be generated */
+
+extern char *PH; /* phone number file */
+extern char *RM; /* remote file name */
+extern char *HO; /* host name */
+
+extern int BR; /* line speed for conversation */
+extern int FS; /* frame size for transfers */
+
+extern char DU; /* this host is dialed up */
+extern char HW; /* this device is hardwired, see hunt.c */
+extern char *ES; /* escape character */
+extern char *EX; /* exceptions */
+extern char *FO; /* force (literal next) char */
+extern char *RC; /* raise character */
+extern char *RE; /* script record file */
+extern char *PR; /* remote prompt */
+extern int DL; /* line delay for file transfers to remote */
+extern int CL; /* char delay for file transfers to remote */
+extern int ET; /* echocheck timeout */
+extern int DB; /* dialback - ignore hangup */
/*
* String value table
*/
-typedef
- struct {
- char *v_name; /* whose name is it */
- char v_type; /* for interpreting set's */
- char v_access; /* protection of touchy ones */
- char *v_abrev; /* possible abreviation */
- char *v_value; /* casted to a union later */
- }
- value_t;
+typedef struct {
+ char *v_name; /* whose name is it */
+ char v_type; /* for interpreting set's */
+ char v_access; /* protection of touchy ones */
+ char *v_abrev; /* possible abreviation */
+ char *v_value; /* casted to a union later */
+} value_t;
#define STRING 01 /* string valued */
#define BOOL 02 /* true-false value */
@@ -117,14 +113,12 @@ typedef
/*
* Definition of ACU line description
*/
-typedef
- struct {
- char *acu_name;
- int (*acu_dialer)(char *, char *);
- void (*acu_disconnect)(void);
- void (*acu_abort)(void);
- }
- acu_t;
+typedef struct {
+ char *acu_name;
+ int (*acu_dialer)(char *, char *);
+ void (*acu_disconnect)(void);
+ void (*acu_abort)(void);
+} acu_t;
#define equal(a, b) (strcmp(a, b) == 0) /* A nice function to compare */
@@ -134,20 +128,18 @@ typedef
* initialize it in vars.c, so we cast it as needed to keep lint
* happy.
*/
-typedef
- union {
- int zz_number;
- int *zz_address;
+typedef union {
+ int zz_number;
+ int *zz_address;
#if defined(_LITTLE_ENDIAN)
- short zz_boolean;
- char zz_character;
+ short zz_boolean;
+ char zz_character;
#endif
#if defined(_BIG_ENDIAN)
- int zz_boolean;
- int zz_character;
+ int zz_boolean;
+ int zz_character;
#endif
- }
- zzhack;
+} zzhack;
#define value(v) vtable[v].v_value
@@ -162,14 +154,12 @@ typedef
* at the begining of a line (as defined by the eolmarks variable).
*/
-typedef
- struct {
- char e_char; /* char to match on */
- char e_flags; /* experimental, priviledged */
- char *e_help; /* help string */
- void (*e_func)(int); /* command */
- }
- esctable_t;
+typedef struct {
+ char e_char; /* char to match on */
+ char e_flags; /* experimental, priviledged */
+ char *e_help; /* help string */
+ void (*e_func)(int); /* command */
+} esctable_t;
#define NORM 00 /* normal protection, execute anyone */
#define EXP 01 /* experimental, mark it with a `*' on help */
@@ -234,30 +224,30 @@ extern void loginit(void);
#define NOFILE ((FILE *)NULL)
#define NOPWD ((struct passwd *)0)
-struct termios arg; /* current mode of local terminal */
-struct termios defarg; /* initial mode of local terminal */
-
-FILE *fscript; /* FILE for scripting */
-FILE *phfd; /* FILE for PHONES file */
-
-int fildes[2]; /* file transfer synchronization channel */
-int repdes[2]; /* read process sychronization channel */
-int FD; /* open file descriptor to remote host */
-int AC; /* open file descriptor to dialer (v831 only) */
-int vflag; /* print .tiprc initialization sequence */
-int sfd; /* for ~< operation */
-int pid; /* pid of tipout */
-int uid, euid; /* real and effective user id's */
-int gid, egid; /* real and effective group id's */
-int stoprompt; /* for interrupting a prompt session */
-int timedout; /* ~> transfer timedout */
-int cumode; /* simulating the "cu" program */
-
-char fname[80]; /* file name buffer for ~< */
-char copyname[80]; /* file name buffer for ~> */
-char ccc; /* synchronization character */
-char ch; /* for tipout */
-char *uucplock; /* name of lock file for uucp's */
+extern struct termios arg; /* current mode of local terminal */
+extern struct termios defarg; /* initial mode of local terminal */
+
+extern FILE *fscript; /* FILE for scripting */
+extern FILE *phfd; /* FILE for PHONES file */
+
+extern int fildes[2]; /* file transfer synchronization channel */
+extern int repdes[2]; /* read process sychronization channel */
+extern int FD; /* open file descriptor to remote host */
+extern int AC; /* open file descriptor to dialer (v831 only) */
+extern int vflag; /* print .tiprc initialization sequence */
+extern int sfd; /* for ~< operation */
+extern int pid; /* pid of tipout */
+extern int uid, euid; /* real and effective user id's */
+extern int gid, egid; /* real and effective group id's */
+extern int stoprompt; /* for interrupting a prompt session */
+extern int timedout; /* ~> transfer timedout */
+extern int cumode; /* simulating the "cu" program */
+
+extern char fname[80]; /* file name buffer for ~< */
+extern char copyname[80]; /* file name buffer for ~> */
+extern char ccc; /* synchronization character */
+extern char ch; /* for tipout */
+extern char *uucplock; /* name of lock file for uucp's */
extern int trusted_device;
diff --git a/usr/src/cmd/tip/tipout.c b/usr/src/cmd/tip/tipout.c
index befb468ca8..872313ed68 100644
--- a/usr/src/cmd/tip/tipout.c
+++ b/usr/src/cmd/tip/tipout.c
@@ -9,8 +9,6 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "tip.h"
#include <limits.h>
@@ -21,6 +19,7 @@
* reading from the remote host
*/
+FILE *fscript;
static sigjmp_buf sigbuf;
/*
diff --git a/usr/src/uts/common/io/cxgbe/t4nex/t4_mac.c b/usr/src/uts/common/io/cxgbe/t4nex/t4_mac.c
index 9b4ffd8325..7dbd90089a 100644
--- a/usr/src/uts/common/io/cxgbe/t4nex/t4_mac.c
+++ b/usr/src/uts/common/io/cxgbe/t4nex/t4_mac.c
@@ -22,6 +22,7 @@
/*
* Copyright 2020 RackTop Systems, Inc.
+ * Copyright 2021 Oxide Computer Company
*/
#include <sys/ddi.h>
@@ -867,7 +868,8 @@ t4_mc_getcapab(void *arg, mac_capab_t cap, void *data)
case MAC_CAPAB_HCKSUM:
if (pi->features & CXGBE_HW_CSUM) {
uint32_t *d = data;
- *d = HCKSUM_INET_FULL_V4 | HCKSUM_IPHDRCKSUM;
+ *d = HCKSUM_INET_FULL_V4 | HCKSUM_IPHDRCKSUM |
+ HCKSUM_INET_FULL_V6;
} else
status = B_FALSE;
break;
@@ -878,8 +880,10 @@ t4_mc_getcapab(void *arg, mac_capab_t cap, void *data)
pi->features & CXGBE_HW_CSUM) {
mac_capab_lso_t *d = data;
- d->lso_flags = LSO_TX_BASIC_TCP_IPV4;
+ d->lso_flags = LSO_TX_BASIC_TCP_IPV4 |
+ LSO_TX_BASIC_TCP_IPV6;
d->lso_basic_tcp_ipv4.lso_max = 65535;
+ d->lso_basic_tcp_ipv6.lso_max = 65535;
} else
status = B_FALSE;
break;
diff --git a/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c b/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c
index 2f7856bd5e..3ec695dfbe 100644
--- a/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c
+++ b/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c
@@ -20,6 +20,10 @@
* release for licensing terms and conditions.
*/
+/*
+ * Copyright 2021 Oxide Computer Company
+ */
+
#include <sys/ddi.h>
#include <sys/sunddi.h>
#include <sys/sunndi.h>
@@ -2900,23 +2904,34 @@ write_txpkt_wr(struct port_info *pi, struct sge_txq *txq, mblk_t *m,
wr->r3 = 0;
if (txinfo->flags & HW_LSO) {
+ uint16_t etype;
struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1);
char *p = (void *)m->b_rptr;
ctrl = V_LSO_OPCODE((u32)CPL_TX_PKT_LSO) | F_LSO_FIRST_SLICE |
F_LSO_LAST_SLICE;
- /* LINTED: E_BAD_PTR_CAST_ALIGN */
- if (((struct ether_header *)p)->ether_type ==
- htons(ETHERTYPE_VLAN)) {
+ etype = ntohs(((struct ether_header *)p)->ether_type);
+ if (etype == ETHERTYPE_VLAN) {
ctrl |= V_LSO_ETHHDR_LEN(1);
+ etype = ntohs(((struct ether_vlan_header *)p)->ether_type);
p += sizeof (struct ether_vlan_header);
- } else
+ } else {
p += sizeof (struct ether_header);
+ }
+
+ switch (etype) {
+ case ETHERTYPE_IP:
+ ctrl |= V_LSO_IPHDR_LEN(IPH_HDR_LENGTH(p) / 4);
+ p += IPH_HDR_LENGTH(p);
+ break;
+ case ETHERTYPE_IPV6:
+ ctrl |= F_LSO_IPV6;
+ ctrl |= V_LSO_IPHDR_LEN(sizeof (ip6_t) / 4);
+ p += sizeof (ip6_t);
+ default:
+ break;
+ }
- /* LINTED: E_BAD_PTR_CAST_ALIGN for IPH_HDR_LENGTH() */
- ctrl |= V_LSO_IPHDR_LEN(IPH_HDR_LENGTH(p) / 4);
- /* LINTED: E_BAD_PTR_CAST_ALIGN for IPH_HDR_LENGTH() */
- p += IPH_HDR_LENGTH(p);
ctrl |= V_LSO_TCPHDR_LEN(TCP_HDR_LENGTH((tcph_t *)p) / 4);
lso->lso_ctrl = cpu_to_be32(ctrl);
diff --git a/usr/src/uts/common/io/vnic/vnic_dev.c b/usr/src/uts/common/io/vnic/vnic_dev.c
index d75db5f258..182d60167a 100644
--- a/usr/src/uts/common/io/vnic/vnic_dev.c
+++ b/usr/src/uts/common/io/vnic/vnic_dev.c
@@ -837,8 +837,8 @@ vnic_m_capab_get(void *arg, mac_capab_t cap, void *cap_data)
uint32_t *hcksum_txflags = cap_data;
*hcksum_txflags = vnic->vn_hcksum_txflags &
- (HCKSUM_INET_FULL_V4 | HCKSUM_IPHDRCKSUM |
- HCKSUM_INET_PARTIAL);
+ (HCKSUM_INET_FULL_V4 | HCKSUM_INET_FULL_V6 |
+ HCKSUM_IPHDRCKSUM | HCKSUM_INET_PARTIAL);
break;
}
case MAC_CAPAB_LSO: {