From 4425deabfe0a61d8000bea6ee10471b29ff0b4d9 Mon Sep 17 00:00:00 2001 From: zacheiss Date: Wed, 16 Jan 2002 21:40:39 +0000 Subject: [PATCH] new status for GigE private subnets. --- clients/moira/cluster.c | 10 ++++++---- clients/stella/stella.c | 3 ++- server/qsetup.pc | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/clients/moira/cluster.c b/clients/moira/cluster.c index dfe44236..244aa939 100644 --- a/clients/moira/cluster.c +++ b/clients/moira/cluster.c @@ -90,7 +90,8 @@ static char *subnet_states[] = { "Private, 100 Mbps (3)", "Private, Other (4)", "Resnet (5)", - "Infrastructure (6)" + "Infrastructure (6)", + "Private, 1000 Mbps (7)" }; static char *MacState(int state) @@ -109,7 +110,7 @@ static char *SubnetState(int state) { static char buf[BUFSIZ]; - if (state < 0 || state > 6) + if (state < 0 || state > 7) { sprintf(buf, "Unknown (%d)", state); return buf; @@ -298,7 +299,8 @@ static char *PrintMachInfo(char **info) if (stat) com_err(program_name, stat, " looking up subnet info"); else if (atoi(((char **)elem2->q_data)[2]) == SNET_STATUS_PRIVATE_10MBPS || - atoi(((char **)elem2->q_data)[2]) == SNET_STATUS_PRIVATE_100MBPS) + atoi(((char **)elem2->q_data)[2]) == SNET_STATUS_PRIVATE_100MBPS || + atoi(((char **)elem2->q_data)[2]) == SNET_STATUS_PRIVATE_1000MBPS) { Put_message(""); sprintf(buf, "Warning: This host is on a private subnet."); @@ -734,7 +736,7 @@ char **AskMCDInfo(char **info, int type, Bool name) if (isdigit(info[SN_STATUS][0])) break; Put_message("Valid status numbers:"); - for (i = 0; i < 7; i++) + for (i = 0; i < 8; i++) Put_message(subnet_states[i]); } if (GetValueFromUser("Network's contact", &info[SN_CONTACT]) == SUB_ERROR) diff --git a/clients/stella/stella.c b/clients/stella/stella.c index c9ceaab4..ca0a0377 100644 --- a/clients/stella/stella.c +++ b/clients/stella/stella.c @@ -695,7 +695,8 @@ int main(int argc, char **argv) if (status) com_err(whoami, status, "while getting subnet information"); if (atoi(argv[SN_STATUS]) == SNET_STATUS_PRIVATE_10MBPS || - atoi(argv[SN_STATUS]) == SNET_STATUS_PRIVATE_100MBPS) + atoi(argv[SN_STATUS]) == SNET_STATUS_PRIVATE_100MBPS || + atoi(argv[SN_STATUS]) == SNET_STATUS_PRIVATE_1000MBPS) { fprintf(stderr, "\nWarning: This host is on a private subnet.\n"); fprintf(stderr, "Billing information shown is superseded by billing information for the subnet.\n"); diff --git a/server/qsetup.pc b/server/qsetup.pc index 83b6d228..040d9533 100644 --- a/server/qsetup.pc +++ b/server/qsetup.pc @@ -264,7 +264,8 @@ int setup_asnt(struct query *q, char *argv[], client *cl) * number. */ if (status == SNET_STATUS_PRIVATE_10MBPS || - status == SNET_STATUS_PRIVATE_100MBPS) + status == SNET_STATUS_PRIVATE_100MBPS || + status == SNET_STATUS_PRIVATE_1000MBPS) { EXEC SQL SELECT account_number FROM accountnumbers WHERE account_number = :account_number; -- 2.45.2