wks_11.c (135446) | wks_11.c (143731) |
---|---|
1/* 2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") 3 * Copyright (C) 1999-2002 Internet Software Consortium. 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 * PERFORMANCE OF THIS SOFTWARE. 16 */ 17 | 1/* 2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") 3 * Copyright (C) 1999-2002 Internet Software Consortium. 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 * PERFORMANCE OF THIS SOFTWARE. 16 */ 17 |
18/* $Id: wks_11.c,v 1.44.12.7 2004/03/08 09:04:44 marka Exp $ */ | 18/* $Id: wks_11.c,v 1.44.12.8 2004/09/16 01:00:58 marka Exp $ */ |
19 20/* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */ 21 22#ifndef RDATA_IN_1_WKS_11_C 23#define RDATA_IN_1_WKS_11_C 24 25#include <limits.h> 26#include <stdlib.h> --- 75 unchanged lines hidden (view full) --- 102 /* 103 * Lowercase the service string as some getservbyname() are 104 * case sensitive and the database is usually in lowercase. 105 */ 106 strncpy(service, DNS_AS_STR(token), sizeof(service)); 107 service[sizeof(service)-1] = '\0'; 108 for (i = strlen(service) - 1; i >= 0; i--) 109 if (isupper(service[i]&0xff)) | 19 20/* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */ 21 22#ifndef RDATA_IN_1_WKS_11_C 23#define RDATA_IN_1_WKS_11_C 24 25#include <limits.h> 26#include <stdlib.h> --- 75 unchanged lines hidden (view full) --- 102 /* 103 * Lowercase the service string as some getservbyname() are 104 * case sensitive and the database is usually in lowercase. 105 */ 106 strncpy(service, DNS_AS_STR(token), sizeof(service)); 107 service[sizeof(service)-1] = '\0'; 108 for (i = strlen(service) - 1; i >= 0; i--) 109 if (isupper(service[i]&0xff)) |
110 service[i] = tolower(service[i]); | 110 service[i] = tolower(service[i]&0xff); |
111 112 port = strtol(DNS_AS_STR(token), &e, 10); 113 if (*e == 0) 114 ; 115 else if ((se = getservbyname(service, ps)) != NULL) 116 port = ntohs(se->s_port); 117 else if ((se = getservbyname(DNS_AS_STR(token), ps)) 118 != NULL) --- 231 unchanged lines hidden --- | 111 112 port = strtol(DNS_AS_STR(token), &e, 10); 113 if (*e == 0) 114 ; 115 else if ((se = getservbyname(service, ps)) != NULL) 116 port = ntohs(se->s_port); 117 else if ((se = getservbyname(DNS_AS_STR(token), ps)) 118 != NULL) --- 231 unchanged lines hidden --- |