mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-30 12:25:10 +01:00
Compare commits
54
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71f42d7e75 | ||
|
|
a31b245266 | ||
|
|
3bca303ce3 | ||
|
|
ce6b0610dc | ||
|
|
f48f6a3925 | ||
|
|
ba58b51ee5 | ||
|
|
cc37a32a9f | ||
|
|
3163ff424e | ||
|
|
fc800e684a | ||
|
|
e9983f17b8 | ||
|
|
b859e04cf4 | ||
|
|
63081fab05 | ||
|
|
1ee4fce8f9 | ||
|
|
ff6413d9b4 | ||
|
|
f1402c7718 | ||
|
|
d8bb4710a0 | ||
|
|
c6325d1067 | ||
|
|
5e3f77db27 | ||
|
|
ce57821091 | ||
|
|
1e2ade94cc | ||
|
|
abb49b2191 | ||
|
|
b0a8e657ba | ||
|
|
de44083139 | ||
|
|
c08e85f83e | ||
|
|
ddfa5073e3 | ||
|
|
1876502656 | ||
|
|
f41238e126 | ||
|
|
69fd68ba96 | ||
|
|
14a3df0748 | ||
|
|
5f291eb343 | ||
|
|
531f796ae1 | ||
|
|
f389fa7e91 | ||
|
|
e70165aea7 | ||
|
|
72246289cf | ||
|
|
17fa1e6b71 | ||
|
|
a45fe8894c | ||
|
|
b68126411b | ||
|
|
836902c219 | ||
|
|
096e0914e6 | ||
|
|
2f57c83ff6 | ||
|
|
1fc7f5654c | ||
|
|
614ff03681 | ||
|
|
727c013e4f | ||
|
|
7a0b8cb799 | ||
|
|
17c235cdba | ||
|
|
e51d04b515 | ||
|
|
4d12ae57ff | ||
|
|
1bb66c13aa | ||
|
|
6f132fefd9 | ||
|
|
d430322bd2 | ||
|
|
e16674995c | ||
|
|
b7b2f5b0b8 | ||
|
|
bd1f338c99 | ||
|
|
bea6bf56fc |
No files matched your search
@@ -1,6 +1,32 @@
|
||||
# $FreeBSD$
|
||||
# @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94
|
||||
|
||||
The compilation of software known as FreeBSD is distributed under the
|
||||
following terms:
|
||||
|
||||
Copyright (C) 1992-2004 The FreeBSD Project. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
All of the documentation and software included in the 4.4BSD and 4.4BSD-Lite
|
||||
Releases is copyrighted by The Regents of the University of California.
|
||||
|
||||
|
||||
+1
-1
@@ -552,7 +552,7 @@ update:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
|
||||
@echo "--------------------------------------------------------------"
|
||||
cd ${.CURDIR}; cvs -R -q update -rRELENG_4 -P -d
|
||||
cd ${.CURDIR}; cvs -R -q update -rRELENG_4_10 -P -d
|
||||
.endif
|
||||
|
||||
#
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
/* Copyright (C) 1992,93,94,95,96,97,98,99,2000, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1
|
||||
#endif
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include "getline.h"
|
||||
|
||||
/* It is desirable to use this bit on systems that have it.
|
||||
The only bit of terminal state we want to twiddle is echoing, which is
|
||||
done in software; there is no need to change the state of the terminal
|
||||
hardware. */
|
||||
|
||||
#ifndef TCSASOFT
|
||||
# define TCSASOFT 0
|
||||
#endif
|
||||
|
||||
char *
|
||||
getpass (const char *prompt)
|
||||
{
|
||||
FILE *in, *out;
|
||||
struct termios s, t;
|
||||
int tty_changed;
|
||||
static char *buf;
|
||||
static size_t bufsize;
|
||||
ssize_t nread;
|
||||
|
||||
/* Try to write to and read from the terminal if we can.
|
||||
If we can't open the terminal, use stderr and stdin. */
|
||||
|
||||
in = fopen ("/dev/tty", "w+");
|
||||
if (in == NULL)
|
||||
{
|
||||
in = stdin;
|
||||
out = stderr;
|
||||
}
|
||||
else
|
||||
out = in;
|
||||
|
||||
/* Turn echoing off if it is on now. */
|
||||
|
||||
if (tcgetattr (fileno (in), &t) == 0)
|
||||
{
|
||||
/* Save the old one. */
|
||||
s = t;
|
||||
/* Tricky, tricky. */
|
||||
t.c_lflag &= ~(ECHO|ISIG);
|
||||
tty_changed = (tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &t) == 0);
|
||||
}
|
||||
else
|
||||
tty_changed = 0;
|
||||
|
||||
/* Write the prompt. */
|
||||
fputs (prompt, out);
|
||||
fflush (out);
|
||||
|
||||
/* Read the password. */
|
||||
nread = getline (&buf, &bufsize, in);
|
||||
if (buf != NULL)
|
||||
{
|
||||
if (nread < 0)
|
||||
buf[0] = '\0';
|
||||
else if (buf[nread - 1] == '\n')
|
||||
{
|
||||
/* Remove the newline. */
|
||||
buf[nread - 1] = '\0';
|
||||
if (tty_changed)
|
||||
{
|
||||
/* Write the newline that was not echoed. */
|
||||
if (out == in) fseek (out, 0, SEEK_CUR);
|
||||
putc ('\n', out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Restore the original setting. */
|
||||
if (tty_changed)
|
||||
(void) tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &s);
|
||||
|
||||
if (in != stdin)
|
||||
/* We opened the terminal; now close it. */
|
||||
fclose (in);
|
||||
|
||||
return buf;
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
# mktemp
|
||||
|
||||
# Copyright (c) Derek Price, Ximbiot <http://ximbiot.com>, and the
|
||||
# Free Software Foundation, Inc. <http://gnu.org>
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
|
||||
|
||||
# This Bourne Shell scriptlet is intended as a simple replacement for
|
||||
# the BSD mktemp function for systems that do not support mktemp. It
|
||||
# currently does not check that the files it is creating did not exist
|
||||
# previously and it does not verify that it successfully creates the
|
||||
# files it returns the names of.
|
||||
mktemp() {
|
||||
if test x"$1" = x-d; then
|
||||
tmp=`echo $2 |sed "s/XXXXXX/$$/"`
|
||||
(umask 077 && exec mkdir $tmp) || return 1
|
||||
else
|
||||
tmp=`echo $1 |sed "s/XXXXXX/$$/"`
|
||||
(umask 077 && touch $tmp) || return 1
|
||||
fi
|
||||
echo $tmp
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Derek Price, Ximbiot <http://ximbiot.com>,
|
||||
* and the Free Software Foundation
|
||||
*
|
||||
* You may distribute under the terms of the GNU General Public License
|
||||
* as specified in the README file that comes with the CVS source
|
||||
* distribution.
|
||||
*
|
||||
* This is the header file for definitions and functions shared by history.c
|
||||
* with other portions of CVS.
|
||||
*/
|
||||
|
||||
#define ALL_HISTORY_REC_TYPES "TOEFWUPCGMAR"
|
||||
@@ -1648,8 +1648,18 @@ serve_unchanged (arg)
|
||||
&& strncmp (arg, name, cp - name) == 0)
|
||||
{
|
||||
timefield = strchr (cp + 1, '/') + 1;
|
||||
if (*timefield != '=')
|
||||
/* If the time field is not currently empty, then one of
|
||||
* serve_modified, serve_is_modified, & serve_unchanged were
|
||||
* already called for this file. We would like to ignore the
|
||||
* reinvocation silently or, better yet, exit with an error
|
||||
* message, but we just avoid the copy-forward and overwrite the
|
||||
* value from the last invocation instead. See the comment below
|
||||
* for more.
|
||||
*/
|
||||
if (*timefield == '/')
|
||||
{
|
||||
/* Copy forward one character. Space was allocated for this
|
||||
* already in serve_entry(). */
|
||||
cp = timefield + strlen (timefield);
|
||||
cp[1] = '\0';
|
||||
while (cp > timefield)
|
||||
@@ -1657,8 +1667,17 @@ serve_unchanged (arg)
|
||||
*cp = cp[-1];
|
||||
--cp;
|
||||
}
|
||||
*timefield = '=';
|
||||
}
|
||||
/* If *TIMEFIELD wasn't "/", we assume that it was because of
|
||||
* multiple calls to Is-Modified & Unchanged by the client and
|
||||
* just overwrite the value from the last call. Technically, we
|
||||
* should probably either ignore calls after the first or send the
|
||||
* client an error, since the client/server protocol specification
|
||||
* specifies that only one call to either Is-Modified or Unchanged
|
||||
* is allowed, but broken versions of WinCVS & TortoiseCVS rely on
|
||||
* this behavior.
|
||||
*/
|
||||
*timefield = '=';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1692,8 +1711,18 @@ serve_is_modified (arg)
|
||||
&& strncmp (arg, name, cp - name) == 0)
|
||||
{
|
||||
timefield = strchr (cp + 1, '/') + 1;
|
||||
if (!(timefield[0] == 'M' && timefield[1] == '/'))
|
||||
/* If the time field is not currently empty, then one of
|
||||
* serve_modified, serve_is_modified, & serve_unchanged were
|
||||
* already called for this file. We would like to ignore the
|
||||
* reinvocation silently or, better yet, exit with an error
|
||||
* message, but we just avoid the copy-forward and overwrite the
|
||||
* value from the last invocation instead. See the comment below
|
||||
* for more.
|
||||
*/
|
||||
if (*timefield == '/')
|
||||
{
|
||||
/* Copy forward one character. Space was allocated for this
|
||||
* already in serve_entry(). */
|
||||
cp = timefield + strlen (timefield);
|
||||
cp[1] = '\0';
|
||||
while (cp > timefield)
|
||||
@@ -1701,8 +1730,17 @@ serve_is_modified (arg)
|
||||
*cp = cp[-1];
|
||||
--cp;
|
||||
}
|
||||
*timefield = 'M';
|
||||
}
|
||||
/* If *TIMEFIELD wasn't "/", we assume that it was because of
|
||||
* multiple calls to Is-Modified & Unchanged by the client and
|
||||
* just overwrite the value from the last call. Technically, we
|
||||
* should probably either ignore calls after the first or send the
|
||||
* client an error, since the client/server protocol specification
|
||||
* specifies that only one call to either Is-Modified or Unchanged
|
||||
* is allowed, but broken versions of WinCVS & TortoiseCVS rely on
|
||||
* this behavior.
|
||||
*/
|
||||
*timefield = 'M';
|
||||
if (kopt != NULL)
|
||||
{
|
||||
if (alloc_pending (strlen (name) + 80))
|
||||
|
||||
@@ -1,187 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Free Software Foundation,
|
||||
* Derek Price,
|
||||
* & Ximbiot <http://ximbiot.com>.
|
||||
*
|
||||
* You may distribute under the terms of the GNU General Public License as
|
||||
* specified in the README file that comes with the CVS source distribution.
|
||||
*
|
||||
* This module uses the hash.c module to implement a stack.
|
||||
*/
|
||||
|
||||
#include "cvs.h"
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
|
||||
static void
|
||||
do_push (stack, elem, isstring)
|
||||
List *stack;
|
||||
void *elem;
|
||||
int isstring;
|
||||
{
|
||||
Node *p = getnode();
|
||||
|
||||
if (isstring)
|
||||
p->key = elem;
|
||||
else
|
||||
p->data = elem;
|
||||
|
||||
addnode(stack, p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
push (stack, elem)
|
||||
List *stack;
|
||||
void *elem;
|
||||
{
|
||||
do_push (stack, elem, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
push_string (stack, elem)
|
||||
List *stack;
|
||||
char *elem;
|
||||
{
|
||||
do_push (stack, elem, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void *
|
||||
do_pop (stack, isstring)
|
||||
List *stack;
|
||||
int isstring;
|
||||
{
|
||||
void *elem;
|
||||
|
||||
if (isempty (stack)) return NULL;
|
||||
|
||||
if (isstring)
|
||||
{
|
||||
elem = stack->list->prev->key;
|
||||
stack->list->prev->key = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
elem = stack->list->prev->data;
|
||||
stack->list->prev->data = NULL;
|
||||
}
|
||||
|
||||
delnode (stack->list->prev);
|
||||
return elem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void *
|
||||
pop (stack)
|
||||
List *stack;
|
||||
{
|
||||
return do_pop (stack, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *
|
||||
pop_string (stack)
|
||||
List *stack;
|
||||
{
|
||||
return do_pop (stack, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
do_unshift (stack, elem, isstring)
|
||||
List *stack;
|
||||
void *elem;
|
||||
int isstring;
|
||||
{
|
||||
Node *p = getnode();
|
||||
|
||||
if (isstring)
|
||||
p->key = elem;
|
||||
else
|
||||
p->data = elem;
|
||||
|
||||
addnode_at_front(stack, p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
unshift (stack, elem)
|
||||
List *stack;
|
||||
void *elem;
|
||||
{
|
||||
do_unshift (stack, elem, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
unshift_string (stack, elem)
|
||||
List *stack;
|
||||
char *elem;
|
||||
{
|
||||
do_unshift (stack, elem, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void *
|
||||
do_shift (stack, isstring)
|
||||
List *stack;
|
||||
int isstring;
|
||||
{
|
||||
void *elem;
|
||||
|
||||
if (isempty (stack)) return NULL;
|
||||
|
||||
if (isstring)
|
||||
{
|
||||
elem = stack->list->next->key;
|
||||
stack->list->next->key = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
elem = stack->list->next->data;
|
||||
stack->list->next->data = NULL;
|
||||
}
|
||||
delnode (stack->list->next);
|
||||
return elem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void *
|
||||
shift (stack)
|
||||
List *stack;
|
||||
{
|
||||
return do_shift (stack, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *
|
||||
shift_string (stack)
|
||||
List *stack;
|
||||
{
|
||||
return do_shift (stack, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
isempty (stack)
|
||||
List *stack;
|
||||
{
|
||||
if (stack->list == stack->list->next)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Free Software Foundation,
|
||||
* Derek Price,
|
||||
* & Ximbiot <http://ximbiot.com>.
|
||||
*
|
||||
* You may distribute under the terms of the GNU General Public License as
|
||||
* specified in the README file that comes with the CVS source distribution.
|
||||
*/
|
||||
|
||||
void push PROTO((List *_stack, void *_elem));
|
||||
void *pop PROTO((List *_stack));
|
||||
void unshift PROTO((List *_stack, void *_elem));
|
||||
void *shift PROTO((List *_stack));
|
||||
void push_string PROTO((List *_stack, char *_elem));
|
||||
char *pop_string PROTO((List *_stack));
|
||||
void unshift_string PROTO((List *_stack, char *_elem));
|
||||
char *shift_string PROTO((List *_stack));
|
||||
int isempty PROTO((List *_stack));
|
||||
@@ -964,6 +964,8 @@ handle_v4(krb5_context context,
|
||||
if(term_flag)
|
||||
exit(0);
|
||||
if(first) {
|
||||
if (len < 2)
|
||||
krb5_errx(context, 1, "received too short len (%d < 2)", len);
|
||||
/* first time around, we have already read len, and two
|
||||
bytes of the version string */
|
||||
krb5_data_alloc(&message, len);
|
||||
|
||||
@@ -64,6 +64,8 @@ krb5_boolean encode_as_rep_as_tgs_rep; /* bug compatibility */
|
||||
krb5_boolean check_ticket_addresses;
|
||||
krb5_boolean allow_null_ticket_addresses;
|
||||
krb5_boolean allow_anonymous;
|
||||
int trpolicy;
|
||||
static const char *trpolicy_str;
|
||||
|
||||
static struct getarg_strings addresses_str; /* addresses to listen on */
|
||||
krb5_addresses explicit_addresses;
|
||||
@@ -287,9 +289,8 @@ configure(int argc, char **argv)
|
||||
|
||||
get_dbinfo();
|
||||
|
||||
if(max_request_str){
|
||||
if(max_request_str)
|
||||
max_request = parse_bytes(max_request_str, NULL);
|
||||
}
|
||||
|
||||
if(max_request == 0){
|
||||
p = krb5_config_get_string (context,
|
||||
@@ -352,6 +353,23 @@ configure(int argc, char **argv)
|
||||
allow_anonymous =
|
||||
krb5_config_get_bool(context, NULL, "kdc",
|
||||
"allow-anonymous", NULL);
|
||||
trpolicy_str =
|
||||
krb5_config_get_string_default(context, NULL, "always-check", "kdc",
|
||||
"transited-policy", NULL);
|
||||
if(strcasecmp(trpolicy_str, "always-check") == 0)
|
||||
trpolicy = TRPOLICY_ALWAYS_CHECK;
|
||||
else if(strcasecmp(trpolicy_str, "allow-per-principal") == 0)
|
||||
trpolicy = TRPOLICY_ALLOW_PER_PRINCIPAL;
|
||||
else if(strcasecmp(trpolicy_str, "always-honour-request") == 0)
|
||||
trpolicy = TRPOLICY_ALWAYS_HONOUR_REQUEST;
|
||||
else {
|
||||
kdc_log(0, "unknown transited-policy: %s, reverting to always-check",
|
||||
trpolicy_str);
|
||||
trpolicy = TRPOLICY_ALWAYS_CHECK;
|
||||
}
|
||||
|
||||
krb5_config_get_bool_default(context, NULL, TRUE, "kdc",
|
||||
"enforce-transited-policy", NULL);
|
||||
#ifdef KRB4
|
||||
if(v4_realm == NULL){
|
||||
p = krb5_config_get_string (context, NULL,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" $Id: kdc.8,v 1.17 2002/08/28 21:09:05 joda Exp $
|
||||
.\"
|
||||
.Dd August 22, 2002
|
||||
.Dd October 22, 2003
|
||||
.Dt KDC 8
|
||||
.Os HEIMDAL
|
||||
.Sh NAME
|
||||
@@ -128,6 +128,27 @@ Permit tickets with no addresses. This option is only relevant when
|
||||
check-ticket-addresses is TRUE.
|
||||
.It Li allow-anonymous = Va boolean
|
||||
Permit anonymous tickets with no addresses.
|
||||
.It Li transited-policy = Xo
|
||||
.Li always-check \*(Ba
|
||||
.Li allow-per-principal |
|
||||
.Li always-honour-request
|
||||
.Xc
|
||||
This controls how KDC requests with the
|
||||
.Li disable-transited-check
|
||||
flag are handled. It can be one of:
|
||||
.Bl -tag -width "xxx" -offset indent
|
||||
.It Li always-check
|
||||
Always check transited encoding, this is the default.
|
||||
.It Li allow-per-principal
|
||||
Currently this is identical to
|
||||
.Li always-check .
|
||||
In a future release, it will be possible to mark a principal as able
|
||||
to handle unchecked requests.
|
||||
.It Li always-honour-request
|
||||
Always do what the client asked.
|
||||
In a future release, it will be possible to force a check per
|
||||
principal.
|
||||
.El
|
||||
.It encode_as_rep_as_tgs_rep = Va boolean
|
||||
Encode AS-Rep as TGS-Rep to be bug-compatible with old DCE code. The
|
||||
Heimdal clients allow both.
|
||||
|
||||
@@ -62,6 +62,11 @@ extern krb5_boolean encode_as_rep_as_tgs_rep;
|
||||
extern krb5_boolean check_ticket_addresses;
|
||||
extern krb5_boolean allow_null_ticket_addresses;
|
||||
extern krb5_boolean allow_anonymous;
|
||||
enum { TRPOLICY_ALWAYS_CHECK,
|
||||
TRPOLICY_ALLOW_PER_PRINCIPAL,
|
||||
TRPOLICY_ALWAYS_HONOUR_REQUEST };
|
||||
extern int trpolicy;
|
||||
extern int enable_v4_cross_realm;
|
||||
|
||||
#ifdef KRB4
|
||||
extern char *v4_realm;
|
||||
|
||||
+159
-79
@@ -355,10 +355,13 @@ get_pa_etype_info(METHOD_DATA *md, hdb_entry *client,
|
||||
|
||||
if(n != pa.len) {
|
||||
char *name;
|
||||
krb5_unparse_name(context, client->principal, &name);
|
||||
ret = krb5_unparse_name(context, client->principal, &name);
|
||||
if (ret)
|
||||
name = "<unparse_name failed>";
|
||||
kdc_log(0, "internal error in get_pa_etype_info(%s): %d != %d",
|
||||
name, n, pa.len);
|
||||
free(name);
|
||||
if (ret == 0)
|
||||
free(name);
|
||||
pa.len = n;
|
||||
}
|
||||
|
||||
@@ -496,8 +499,8 @@ as_rep(KDC_REQ *req,
|
||||
krb5_enctype cetype, setype;
|
||||
EncTicketPart et;
|
||||
EncKDCRepPart ek;
|
||||
krb5_principal client_princ, server_princ;
|
||||
char *client_name, *server_name;
|
||||
krb5_principal client_princ = NULL, server_princ = NULL;
|
||||
char *client_name = NULL, *server_name = NULL;
|
||||
krb5_error_code ret = 0;
|
||||
const char *e_text = NULL;
|
||||
krb5_crypto crypto;
|
||||
@@ -506,28 +509,32 @@ as_rep(KDC_REQ *req,
|
||||
memset(&rep, 0, sizeof(rep));
|
||||
|
||||
if(b->sname == NULL){
|
||||
server_name = "<unknown server>";
|
||||
ret = KRB5KRB_ERR_GENERIC;
|
||||
e_text = "No server in request";
|
||||
} else{
|
||||
principalname2krb5_principal (&server_princ, *(b->sname), b->realm);
|
||||
krb5_unparse_name(context, server_princ, &server_name);
|
||||
ret = krb5_unparse_name(context, server_princ, &server_name);
|
||||
}
|
||||
if (ret) {
|
||||
kdc_log(0, "AS-REQ malformed server name from %s", from);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if(b->cname == NULL){
|
||||
client_name = "<unknown client>";
|
||||
ret = KRB5KRB_ERR_GENERIC;
|
||||
e_text = "No client in request";
|
||||
} else {
|
||||
principalname2krb5_principal (&client_princ, *(b->cname), b->realm);
|
||||
krb5_unparse_name(context, client_princ, &client_name);
|
||||
ret = krb5_unparse_name(context, client_princ, &client_name);
|
||||
}
|
||||
if (ret) {
|
||||
kdc_log(0, "AS-REQ malformed client name from %s", from);
|
||||
goto out;
|
||||
}
|
||||
|
||||
kdc_log(0, "AS-REQ %s from %s for %s",
|
||||
client_name, from, server_name);
|
||||
|
||||
if(ret)
|
||||
goto out;
|
||||
|
||||
ret = db_fetch(client_princ, &client);
|
||||
if(ret){
|
||||
kdc_log(0, "UNKNOWN -- %s: %s", client_name,
|
||||
@@ -559,7 +566,6 @@ as_rep(KDC_REQ *req,
|
||||
while((pa = find_padata(req, &i, KRB5_PADATA_ENC_TIMESTAMP))){
|
||||
krb5_data ts_data;
|
||||
PA_ENC_TS_ENC p;
|
||||
time_t patime;
|
||||
size_t len;
|
||||
EncryptedData enc_data;
|
||||
Key *pa_key;
|
||||
@@ -635,7 +641,6 @@ as_rep(KDC_REQ *req,
|
||||
client_name);
|
||||
continue;
|
||||
}
|
||||
patime = p.patimestamp;
|
||||
free_PA_ENC_TS_ENC(&p);
|
||||
if (abs(kdc_time - p.patimestamp) > context->max_skew) {
|
||||
ret = KRB5KDC_ERR_PREAUTH_FAILED;
|
||||
@@ -716,9 +721,10 @@ as_rep(KDC_REQ *req,
|
||||
if (ret == 0) {
|
||||
kdc_log(5, "Using %s/%s", cet, set);
|
||||
free(set);
|
||||
} else
|
||||
free(cet);
|
||||
} else
|
||||
}
|
||||
free(cet);
|
||||
}
|
||||
if (ret != 0)
|
||||
kdc_log(5, "Using e-types %d/%d", cetype, setype);
|
||||
}
|
||||
|
||||
@@ -841,13 +847,8 @@ as_rep(KDC_REQ *req,
|
||||
copy_HostAddresses(b->addresses, et.caddr);
|
||||
}
|
||||
|
||||
{
|
||||
krb5_data empty_string;
|
||||
|
||||
krb5_data_zero(&empty_string);
|
||||
et.transited.tr_type = DOMAIN_X500_COMPRESS;
|
||||
et.transited.contents = empty_string;
|
||||
}
|
||||
et.transited.tr_type = DOMAIN_X500_COMPRESS;
|
||||
krb5_data_zero(&et.transited.contents);
|
||||
|
||||
copy_EncryptionKey(&et.key, &ek.key);
|
||||
|
||||
@@ -914,8 +915,8 @@ as_rep(KDC_REQ *req,
|
||||
client->kvno, &ckey->key, &e_text, reply);
|
||||
free_EncTicketPart(&et);
|
||||
free_EncKDCRepPart(&ek);
|
||||
free_AS_REP(&rep);
|
||||
out:
|
||||
free_AS_REP(&rep);
|
||||
if(ret){
|
||||
krb5_mk_error(context,
|
||||
ret,
|
||||
@@ -929,9 +930,11 @@ as_rep(KDC_REQ *req,
|
||||
ret = 0;
|
||||
}
|
||||
out2:
|
||||
krb5_free_principal(context, client_princ);
|
||||
if (client_princ)
|
||||
krb5_free_principal(context, client_princ);
|
||||
free(client_name);
|
||||
krb5_free_principal(context, server_princ);
|
||||
if (server_princ)
|
||||
krb5_free_principal(context, server_princ);
|
||||
free(server_name);
|
||||
if(client)
|
||||
free_ent(client);
|
||||
@@ -1054,33 +1057,35 @@ check_tgs_flags(KDC_REQ_BODY *b, EncTicketPart *tgt, EncTicketPart *et)
|
||||
}
|
||||
|
||||
static krb5_error_code
|
||||
fix_transited_encoding(TransitedEncoding *tr,
|
||||
fix_transited_encoding(krb5_boolean check_policy,
|
||||
TransitedEncoding *tr,
|
||||
EncTicketPart *et,
|
||||
const char *client_realm,
|
||||
const char *server_realm,
|
||||
const char *tgt_realm)
|
||||
{
|
||||
krb5_error_code ret = 0;
|
||||
if(strcmp(client_realm, tgt_realm) && strcmp(server_realm, tgt_realm)){
|
||||
char **realms = NULL, **tmp;
|
||||
int num_realms = 0;
|
||||
int i;
|
||||
if(tr->tr_type && tr->contents.length != 0) {
|
||||
if(tr->tr_type != DOMAIN_X500_COMPRESS){
|
||||
kdc_log(0, "Unknown transited type: %u",
|
||||
tr->tr_type);
|
||||
return KRB5KDC_ERR_TRTYPE_NOSUPP;
|
||||
}
|
||||
ret = krb5_domain_x500_decode(context,
|
||||
tr->contents,
|
||||
&realms,
|
||||
&num_realms,
|
||||
client_realm,
|
||||
server_realm);
|
||||
if(ret){
|
||||
krb5_warn(context, ret, "Decoding transited encoding");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
char **realms, **tmp;
|
||||
int num_realms;
|
||||
int i;
|
||||
|
||||
if(tr->tr_type != DOMAIN_X500_COMPRESS) {
|
||||
kdc_log(0, "Unknown transited type: %u", tr->tr_type);
|
||||
return KRB5KDC_ERR_TRTYPE_NOSUPP;
|
||||
}
|
||||
|
||||
ret = krb5_domain_x500_decode(context,
|
||||
tr->contents,
|
||||
&realms,
|
||||
&num_realms,
|
||||
client_realm,
|
||||
server_realm);
|
||||
if(ret){
|
||||
krb5_warn(context, ret, "Decoding transited encoding");
|
||||
return ret;
|
||||
}
|
||||
if(strcmp(client_realm, tgt_realm) && strcmp(server_realm, tgt_realm)) {
|
||||
/* not us, so add the previous realm to transited set */
|
||||
if (num_realms < 0 || num_realms + 1 > UINT_MAX/sizeof(*realms)) {
|
||||
ret = ERANGE;
|
||||
goto free_realms;
|
||||
@@ -1097,16 +1102,46 @@ fix_transited_encoding(TransitedEncoding *tr,
|
||||
goto free_realms;
|
||||
}
|
||||
num_realms++;
|
||||
free_TransitedEncoding(tr);
|
||||
tr->tr_type = DOMAIN_X500_COMPRESS;
|
||||
ret = krb5_domain_x500_encode(realms, num_realms, &tr->contents);
|
||||
if(ret)
|
||||
krb5_warn(context, ret, "Encoding transited encoding");
|
||||
free_realms:
|
||||
for(i = 0; i < num_realms; i++)
|
||||
free(realms[i]);
|
||||
free(realms);
|
||||
}
|
||||
if(num_realms == 0) {
|
||||
if(strcmp(client_realm, server_realm))
|
||||
kdc_log(0, "cross-realm %s -> %s", client_realm, server_realm);
|
||||
} else {
|
||||
size_t l = 0;
|
||||
char *rs;
|
||||
for(i = 0; i < num_realms; i++)
|
||||
l += strlen(realms[i]) + 2;
|
||||
rs = malloc(l);
|
||||
if(rs != NULL) {
|
||||
*rs = '\0';
|
||||
for(i = 0; i < num_realms; i++) {
|
||||
if(i > 0)
|
||||
strlcat(rs, ", ", l);
|
||||
strlcat(rs, realms[i], l);
|
||||
}
|
||||
kdc_log(0, "cross-realm %s -> %s via [%s]", client_realm, server_realm, rs);
|
||||
free(rs);
|
||||
}
|
||||
}
|
||||
if(check_policy) {
|
||||
ret = krb5_check_transited(context, client_realm,
|
||||
server_realm,
|
||||
realms, num_realms, NULL);
|
||||
if(ret) {
|
||||
krb5_warn(context, ret, "cross-realm %s -> %s",
|
||||
client_realm, server_realm);
|
||||
goto free_realms;
|
||||
}
|
||||
et->flags.transited_policy_checked = 1;
|
||||
}
|
||||
et->transited.tr_type = DOMAIN_X500_COMPRESS;
|
||||
ret = krb5_domain_x500_encode(realms, num_realms, &et->transited.contents);
|
||||
if(ret)
|
||||
krb5_warn(context, ret, "Encoding transited encoding");
|
||||
free_realms:
|
||||
for(i = 0; i < num_realms; i++)
|
||||
free(realms[i]);
|
||||
free(realms);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1172,18 +1207,35 @@ tgs_make_reply(KDC_REQ_BODY *b,
|
||||
|
||||
ret = check_tgs_flags(b, tgt, &et);
|
||||
if(ret)
|
||||
return ret;
|
||||
goto out;
|
||||
|
||||
copy_TransitedEncoding(&tgt->transited, &et.transited);
|
||||
ret = fix_transited_encoding(&et.transited,
|
||||
/* We should check the transited encoding if:
|
||||
1) the request doesn't ask not to be checked
|
||||
2) globally enforcing a check
|
||||
3) principal requires checking
|
||||
4) we allow non-check per-principal, but principal isn't marked as allowing this
|
||||
5) we don't globally allow this
|
||||
*/
|
||||
|
||||
#define GLOBAL_FORCE_TRANSITED_CHECK (trpolicy == TRPOLICY_ALWAYS_CHECK)
|
||||
#define GLOBAL_ALLOW_PER_PRINCIPAL (trpolicy == TRPOLICY_ALLOW_PER_PRINCIPAL)
|
||||
#define GLOBAL_ALLOW_DISABLE_TRANSITED_CHECK (trpolicy == TRPOLICY_ALWAYS_HONOUR_REQUEST)
|
||||
/* these will consult the database in future release */
|
||||
#define PRINCIPAL_FORCE_TRANSITED_CHECK(P) 0
|
||||
#define PRINCIPAL_ALLOW_DISABLE_TRANSITED_CHECK(P) 0
|
||||
|
||||
ret = fix_transited_encoding(!f.disable_transited_check ||
|
||||
GLOBAL_FORCE_TRANSITED_CHECK ||
|
||||
PRINCIPAL_FORCE_TRANSITED_CHECK(server) ||
|
||||
!((GLOBAL_ALLOW_PER_PRINCIPAL &&
|
||||
PRINCIPAL_ALLOW_DISABLE_TRANSITED_CHECK(server)) ||
|
||||
GLOBAL_ALLOW_DISABLE_TRANSITED_CHECK),
|
||||
&tgt->transited, &et,
|
||||
*krb5_princ_realm(context, client_principal),
|
||||
*krb5_princ_realm(context, server->principal),
|
||||
*krb5_princ_realm(context, krbtgt->principal));
|
||||
if(ret){
|
||||
free_TransitedEncoding(&et.transited);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if(ret)
|
||||
goto out;
|
||||
|
||||
copy_Realm(krb5_princ_realm(context, server->principal),
|
||||
&rep.ticket.realm);
|
||||
@@ -1278,7 +1330,7 @@ tgs_make_reply(KDC_REQ_BODY *b,
|
||||
DES3? */
|
||||
ret = encode_reply(&rep, &et, &ek, etype, adtkt ? 0 : server->kvno, ekey,
|
||||
0, &tgt->key, e_text, reply);
|
||||
out:
|
||||
out:
|
||||
free_TGS_REP(&rep);
|
||||
free_TransitedEncoding(&et.transited);
|
||||
if(et.starttime)
|
||||
@@ -1380,13 +1432,13 @@ get_krbtgt_realm(const PrincipalName *p)
|
||||
}
|
||||
|
||||
static Realm
|
||||
find_rpath(Realm r)
|
||||
find_rpath(Realm crealm, Realm srealm)
|
||||
{
|
||||
const char *new_realm = krb5_config_get_string(context,
|
||||
NULL,
|
||||
"libdefaults",
|
||||
"capath",
|
||||
r,
|
||||
"capaths",
|
||||
crealm,
|
||||
srealm,
|
||||
NULL);
|
||||
return (Realm)new_realm;
|
||||
}
|
||||
@@ -1456,10 +1508,14 @@ tgs_rep2(KDC_REQ_BODY *b,
|
||||
|
||||
if(ret) {
|
||||
char *p;
|
||||
krb5_unparse_name(context, princ, &p);
|
||||
ret = krb5_unparse_name(context, princ, &p);
|
||||
if (ret != 0)
|
||||
p = "<unparse_name failed>";
|
||||
krb5_free_principal(context, princ);
|
||||
kdc_log(0, "Ticket-granting ticket not found in database: %s: %s",
|
||||
p, krb5_get_err_text(context, ret));
|
||||
free(p);
|
||||
if (ret == 0)
|
||||
free(p);
|
||||
ret = KRB5KRB_AP_ERR_NOT_US;
|
||||
goto out2;
|
||||
}
|
||||
@@ -1468,12 +1524,16 @@ tgs_rep2(KDC_REQ_BODY *b,
|
||||
*ap_req.ticket.enc_part.kvno != krbtgt->kvno){
|
||||
char *p;
|
||||
|
||||
krb5_unparse_name (context, princ, &p);
|
||||
ret = krb5_unparse_name (context, princ, &p);
|
||||
krb5_free_principal(context, princ);
|
||||
if (ret != 0)
|
||||
p = "<unparse_name failed>";
|
||||
kdc_log(0, "Ticket kvno = %d, DB kvno = %d (%s)",
|
||||
*ap_req.ticket.enc_part.kvno,
|
||||
krbtgt->kvno,
|
||||
p);
|
||||
free (p);
|
||||
if (ret == 0)
|
||||
free (p);
|
||||
ret = KRB5KRB_AP_ERR_BADKEYVER;
|
||||
goto out2;
|
||||
}
|
||||
@@ -1657,9 +1717,13 @@ tgs_rep2(KDC_REQ_BODY *b,
|
||||
}
|
||||
|
||||
principalname2krb5_principal(&sp, *s, r);
|
||||
krb5_unparse_name(context, sp, &spn);
|
||||
ret = krb5_unparse_name(context, sp, &spn);
|
||||
if (ret)
|
||||
goto out;
|
||||
principalname2krb5_principal(&cp, tgt->cname, tgt->crealm);
|
||||
krb5_unparse_name(context, cp, &cpn);
|
||||
ret = krb5_unparse_name(context, cp, &cpn);
|
||||
if (ret)
|
||||
goto out;
|
||||
unparse_flags (KDCOptions2int(b->kdc_options), KDCOptions_units,
|
||||
opt_str, sizeof(opt_str));
|
||||
if(*opt_str)
|
||||
@@ -1676,7 +1740,7 @@ tgs_rep2(KDC_REQ_BODY *b,
|
||||
|
||||
if ((req_rlm = get_krbtgt_realm(&sp->name)) != NULL) {
|
||||
if(loop++ < 2) {
|
||||
new_rlm = find_rpath(req_rlm);
|
||||
new_rlm = find_rpath(tgt->crealm, req_rlm);
|
||||
if(new_rlm) {
|
||||
kdc_log(5, "krbtgt for realm %s not found, trying %s",
|
||||
req_rlm, new_rlm);
|
||||
@@ -1684,7 +1748,9 @@ tgs_rep2(KDC_REQ_BODY *b,
|
||||
free(spn);
|
||||
krb5_make_principal(context, &sp, r,
|
||||
KRB5_TGS_NAME, new_rlm, NULL);
|
||||
krb5_unparse_name(context, sp, &spn);
|
||||
ret = krb5_unparse_name(context, sp, &spn);
|
||||
if (ret)
|
||||
goto out;
|
||||
goto server_lookup;
|
||||
}
|
||||
}
|
||||
@@ -1697,7 +1763,9 @@ tgs_rep2(KDC_REQ_BODY *b,
|
||||
free(spn);
|
||||
krb5_make_principal(context, &sp, r, KRB5_TGS_NAME,
|
||||
realms[0], NULL);
|
||||
krb5_unparse_name(context, sp, &spn);
|
||||
ret = krb5_unparse_name(context, sp, &spn);
|
||||
if (ret)
|
||||
goto out;
|
||||
krb5_free_host_realm(context, realms);
|
||||
goto server_lookup;
|
||||
}
|
||||
@@ -1725,6 +1793,18 @@ tgs_rep2(KDC_REQ_BODY *b,
|
||||
}
|
||||
#endif
|
||||
|
||||
if(strcmp(krb5_principal_get_realm(context, sp),
|
||||
krb5_principal_get_comp_string(context, krbtgt->principal, 1)) != 0) {
|
||||
char *tpn;
|
||||
ret = krb5_unparse_name(context, krbtgt->principal, &tpn);
|
||||
kdc_log(0, "Request with wrong krbtgt: %s", (ret == 0) ? tpn : "<unknown>");
|
||||
if(ret == 0)
|
||||
free(tpn);
|
||||
ret = KRB5KRB_AP_ERR_NOT_US;
|
||||
goto out;
|
||||
|
||||
}
|
||||
|
||||
ret = check_flags(client, cpn, server, spn, FALSE);
|
||||
if(ret)
|
||||
goto out;
|
||||
|
||||
@@ -520,6 +520,15 @@ krb5_change_password (
|
||||
krb5_data */*result_code_string*/,
|
||||
krb5_data */*result_string*/);
|
||||
|
||||
krb5_error_code
|
||||
krb5_check_transited (
|
||||
krb5_context /*context*/,
|
||||
krb5_const_realm /*client_realm*/,
|
||||
krb5_const_realm /*server_realm*/,
|
||||
krb5_realm */*realms*/,
|
||||
int /*num_realms*/,
|
||||
int */*bad_realm*/);
|
||||
|
||||
krb5_error_code
|
||||
krb5_check_transited_realms (
|
||||
krb5_context /*context*/,
|
||||
|
||||
@@ -129,6 +129,32 @@ krb5_decode_ap_req(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static krb5_error_code
|
||||
check_transited(krb5_context context, Ticket *ticket, EncTicketPart *enc)
|
||||
{
|
||||
char **realms;
|
||||
int num_realms;
|
||||
krb5_error_code ret;
|
||||
|
||||
if(enc->transited.tr_type != DOMAIN_X500_COMPRESS)
|
||||
return KRB5KDC_ERR_TRTYPE_NOSUPP;
|
||||
|
||||
if(enc->transited.contents.length == 0)
|
||||
return 0;
|
||||
|
||||
ret = krb5_domain_x500_decode(context, enc->transited.contents,
|
||||
&realms, &num_realms,
|
||||
enc->crealm,
|
||||
ticket->realm);
|
||||
if(ret)
|
||||
return ret;
|
||||
ret = krb5_check_transited(context, enc->crealm,
|
||||
ticket->realm,
|
||||
realms, num_realms, NULL);
|
||||
free(realms);
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_decrypt_ticket(krb5_context context,
|
||||
Ticket *ticket,
|
||||
@@ -161,6 +187,14 @@ krb5_decrypt_ticket(krb5_context context,
|
||||
krb5_clear_error_string (context);
|
||||
return KRB5KRB_AP_ERR_TKT_EXPIRED;
|
||||
}
|
||||
|
||||
if(!t.flags.transited_policy_checked) {
|
||||
ret = check_transited(context, ticket, &t);
|
||||
if(ret) {
|
||||
free_EncTicketPart(&t);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(out)
|
||||
@@ -209,29 +243,6 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static krb5_error_code
|
||||
check_transited(krb5_context context,
|
||||
krb5_ticket *ticket)
|
||||
{
|
||||
char **realms;
|
||||
int num_realms;
|
||||
krb5_error_code ret;
|
||||
|
||||
if(ticket->ticket.transited.tr_type != DOMAIN_X500_COMPRESS)
|
||||
return KRB5KDC_ERR_TRTYPE_NOSUPP;
|
||||
|
||||
ret = krb5_domain_x500_decode(ticket->ticket.transited.contents,
|
||||
&realms, &num_realms,
|
||||
ticket->client->realm,
|
||||
ticket->server->realm);
|
||||
if(ret)
|
||||
return ret;
|
||||
ret = krb5_check_transited_realms(context, realms, num_realms, NULL);
|
||||
free(realms);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
krb5_error_code
|
||||
krb5_verify_ap_req(krb5_context context,
|
||||
|
||||
@@ -304,6 +304,12 @@ krb5_domain_x500_decode(krb5_context context,
|
||||
struct tr_realm *p, **q;
|
||||
int ret;
|
||||
|
||||
if(tr.length == 0) {
|
||||
*realms = NULL;
|
||||
*num_realms = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* split string in components */
|
||||
ret = decode_realms(context, tr.data, tr.length, &r);
|
||||
if(ret)
|
||||
@@ -358,6 +364,9 @@ krb5_domain_x500_encode(char **realms, int num_realms, krb5_data *encoding)
|
||||
char *s = NULL;
|
||||
int len = 0;
|
||||
int i;
|
||||
krb5_data_zero(encoding);
|
||||
if (num_realms == 0)
|
||||
return 0;
|
||||
for(i = 0; i < num_realms; i++){
|
||||
len += strlen(realms[i]);
|
||||
if(realms[i][0] == '/')
|
||||
@@ -365,6 +374,8 @@ krb5_domain_x500_encode(char **realms, int num_realms, krb5_data *encoding)
|
||||
}
|
||||
len += num_realms - 1;
|
||||
s = malloc(len + 1);
|
||||
if (s == NULL)
|
||||
return ENOMEM;
|
||||
*s = '\0';
|
||||
for(i = 0; i < num_realms; i++){
|
||||
if(i && i < num_realms - 1)
|
||||
@@ -378,6 +389,44 @@ krb5_domain_x500_encode(char **realms, int num_realms, krb5_data *encoding)
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_check_transited(krb5_context context,
|
||||
krb5_const_realm client_realm,
|
||||
krb5_const_realm server_realm,
|
||||
krb5_realm *realms,
|
||||
int num_realms,
|
||||
int *bad_realm)
|
||||
{
|
||||
char **tr_realms;
|
||||
char **p;
|
||||
int i;
|
||||
|
||||
if(num_realms == 0)
|
||||
return 0;
|
||||
|
||||
tr_realms = krb5_config_get_strings(context, NULL,
|
||||
"capaths",
|
||||
client_realm,
|
||||
server_realm,
|
||||
NULL);
|
||||
for(i = 0; i < num_realms; i++) {
|
||||
for(p = tr_realms; p && *p; p++) {
|
||||
if(strcmp(*p, realms[i]) == 0)
|
||||
break;
|
||||
}
|
||||
if(p == NULL || *p == NULL) {
|
||||
krb5_config_free_strings(tr_realms);
|
||||
krb5_set_error_string (context, "no transit through realm %s",
|
||||
realms[i]);
|
||||
if(bad_realm)
|
||||
*bad_realm = i;
|
||||
return KRB5KRB_AP_ERR_ILL_CR_TKT;
|
||||
}
|
||||
}
|
||||
krb5_config_free_strings(tr_realms);
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
krb5_check_transited_realms(krb5_context context,
|
||||
const char *const *realms,
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
..
|
||||
Xaw
|
||||
..
|
||||
Xcursor
|
||||
..
|
||||
Xft
|
||||
..
|
||||
Xmu
|
||||
@@ -115,6 +117,8 @@
|
||||
..
|
||||
fs
|
||||
..
|
||||
icons
|
||||
..
|
||||
lbxproxy
|
||||
..
|
||||
locale
|
||||
@@ -124,6 +128,8 @@
|
||||
..
|
||||
common
|
||||
..
|
||||
el_GR.UTF-8
|
||||
..
|
||||
en_US.UTF-8
|
||||
..
|
||||
en_US.utf
|
||||
@@ -142,6 +148,8 @@
|
||||
..
|
||||
iso8859-10
|
||||
..
|
||||
iso8859-11
|
||||
..
|
||||
iso8859-13
|
||||
..
|
||||
iso8859-14
|
||||
@@ -172,14 +180,22 @@
|
||||
..
|
||||
ja.SJIS
|
||||
..
|
||||
ja_JP.UTF-8
|
||||
..
|
||||
ko
|
||||
..
|
||||
ko_KR.UTF-8
|
||||
..
|
||||
koi8-c
|
||||
..
|
||||
koi8-r
|
||||
..
|
||||
koi8-u
|
||||
..
|
||||
lib
|
||||
common
|
||||
..
|
||||
..
|
||||
microsoft-cp1251
|
||||
..
|
||||
microsoft-cp1255
|
||||
@@ -200,6 +216,8 @@
|
||||
..
|
||||
th_TH.TACTIS
|
||||
..
|
||||
th_TH.UTF-8
|
||||
..
|
||||
tscii-0
|
||||
..
|
||||
vi_VN.tcvn
|
||||
@@ -220,6 +238,10 @@
|
||||
..
|
||||
zh_TW.Big5
|
||||
..
|
||||
zh_TW.UTF-8
|
||||
..
|
||||
zh_TW.big5
|
||||
..
|
||||
..
|
||||
proxymngr
|
||||
..
|
||||
@@ -241,6 +263,8 @@
|
||||
..
|
||||
xedit
|
||||
lisp
|
||||
progmodes
|
||||
..
|
||||
..
|
||||
..
|
||||
xinit
|
||||
@@ -285,6 +309,8 @@
|
||||
..
|
||||
nec
|
||||
..
|
||||
pc
|
||||
..
|
||||
sgi
|
||||
..
|
||||
sony
|
||||
@@ -322,6 +348,8 @@
|
||||
..
|
||||
..
|
||||
libdata
|
||||
pkgconfig
|
||||
..
|
||||
..
|
||||
libexec
|
||||
..
|
||||
|
||||
+1
-10
@@ -32,7 +32,7 @@
|
||||
.\" @(#)mlock.2 8.2 (Berkeley) 12/11/93
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd June 2, 1993
|
||||
.Dd May 18, 2004
|
||||
.Dt MLOCK 2
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -145,15 +145,6 @@ Some portion of the indicated address range is not locked.
|
||||
.Xr setrlimit 2 ,
|
||||
.Xr getpagesize 3
|
||||
.Sh BUGS
|
||||
Unlike The Sun implementation, multiple
|
||||
.Fn mlock
|
||||
calls on the same address range require the corresponding number of
|
||||
.Fn munlock
|
||||
calls to actually unlock the pages, i.e.\&
|
||||
.Fn mlock
|
||||
nests.
|
||||
This should be considered a consequence of the implementation
|
||||
and not a feature.
|
||||
.Pp
|
||||
The per-process resource limit is a limit on the amount of virtual
|
||||
memory locked, while the system-wide limit is for the number of locked
|
||||
|
||||
+15
-4
@@ -25,7 +25,7 @@
|
||||
#
|
||||
# Automatic SNAP versioning:
|
||||
DATE != date +%Y%m%d
|
||||
BASE = 4.9
|
||||
BASE = 4.10
|
||||
BUILDNAME?=${BASE}-${DATE}-STABLE
|
||||
#
|
||||
#CHROOTDIR=/junk/release
|
||||
@@ -106,6 +106,13 @@ DOMINIMALDOCPORTS= YES
|
||||
.include "Makefile.inc.docports"
|
||||
.endif
|
||||
|
||||
# Make changing names of disc1 CD possible. Usually disc1 directory
|
||||
# contents is used for creating both miniinst and disc1.
|
||||
DISC1_LABEL?= fbsd_miniinst
|
||||
DISC1_NAME?= miniinst
|
||||
DISC2_LABEL?= fbsd_livefs
|
||||
DISC2_NAME?= disc2
|
||||
|
||||
# Helper variable
|
||||
.if defined(NOPORTS)
|
||||
.if !defined(DOMINIMALDOCPORTS) || ${DOMINIMALDOCPORTS} != "YES"
|
||||
@@ -363,6 +370,10 @@ rerelease release:
|
||||
BOOT_CONFIG \
|
||||
BUILDNAME \
|
||||
CD_EXTRA_BITS \
|
||||
DISC1_LABEL \
|
||||
DISC1_NAME \
|
||||
DISC2_LABEL \
|
||||
DISC2_NAME \
|
||||
DISTRIBUTIONS \
|
||||
DOC_LANG \
|
||||
DOMINIMALDOCPORTS \
|
||||
@@ -811,9 +822,9 @@ iso.1:
|
||||
@if [ -r ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ]; then \
|
||||
echo "Creating ISO images..."; \
|
||||
sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
|
||||
fbsd_miniinst ${CD}/${BUILDNAME}-${TARGET}-miniinst.iso ${CD_DISC1}; \
|
||||
${DISC1_LABEL} ${CD}/${BUILDNAME}-${TARGET}-${DISC1_NAME}.iso ${CD_DISC1}; \
|
||||
sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
|
||||
fbsd_livefs ${CD}/${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2}; \
|
||||
${DISC2_LABEL} ${CD}/${BUILDNAME}-${TARGET}-${DISC2_NAME}.iso ${CD_DISC2}; \
|
||||
if [ "x${CD_EXTRA_BITS}" != "x" ]; then \
|
||||
sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
|
||||
fbsd_boot ${CD}/${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} ${CD_EXTRA_BITS}; \
|
||||
@@ -834,7 +845,7 @@ doc.1:
|
||||
make all install clean BATCH=yes WITHOUT_X11=yes JADETEX=no \
|
||||
WITHOUT_PYTHON=yes FORCE_PKG_REGISTER=yes; \
|
||||
done
|
||||
@cd /usr/doc && make all install 'FORMATS=html html-split txt' INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/bin/usr/share/doc
|
||||
@cd /usr/doc && make all install 'FORMATS=html html-split txt' INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/bin/usr/share/doc URLS_ABSOLUTE=YES
|
||||
touch doc.1
|
||||
|
||||
#
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<year>2003</year>
|
||||
<year>2004</year>
|
||||
<holder role="mailto:[email protected]">The FreeBSD Documentation Project</holder>
|
||||
</copyright>
|
||||
|
||||
@@ -125,44 +126,7 @@
|
||||
]]>
|
||||
|
||||
<![ %release.type.snapshot [
|
||||
|
||||
<para>(5 Dec 2003) <application>BIND</application> contains the potential for a
|
||||
denial-of-service attack. This vulnerability has been addressed
|
||||
by a vendor patch on the &release.prev; security fix branch and
|
||||
by the import of a new version to the &release.branch;
|
||||
development branch. For more information, see
|
||||
<ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:19.bind.asc">FreeBSD-SA-03:19</ulink>.</para>
|
||||
|
||||
<para>(8 Feb 2004) A bug with the System V Shared Memory interface
|
||||
(specifically the &man.shmat.2; system call)
|
||||
can cause a shared memory segment to reference
|
||||
unallocated kernel memory. In turn, this can permit a local
|
||||
attacker to gain unauthorized access to parts of kernel memory,
|
||||
possibly resulting in disclosure of sensitive information,
|
||||
bypass of access control mechanisms, or privilege escalation.
|
||||
More details, including bugfix and workaround information,
|
||||
can be found in security advisory <ulink
|
||||
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-04:02.shmat.asc">FreeBSD-SA-04:02</ulink>.</para>
|
||||
|
||||
<para>(4 Mar 2004) It is possible for a remote attacker to conduct
|
||||
a low-bandwidth denial-of-service attack against a machine
|
||||
providing TCP-based services, filling up the target's memory
|
||||
buffers and potentially leading to a system crash. This
|
||||
vulnerability has been addressed on the &os; &release.prev;
|
||||
security fix branch. Security advisory <ulink
|
||||
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-04:04.tcp.asc">FreeBSD-SA-04:04</ulink>
|
||||
contains more details, as well as information on patching
|
||||
existing systems.</para>
|
||||
|
||||
<para>(17 Mar 2004) By performing a specially crafted SSL/TLS
|
||||
handshake with an application that uses OpenSSL a null pointer
|
||||
may be dereferenced. This may in turn cause the application to
|
||||
crash, resulting in a denial of service attack. For more information
|
||||
see the Security Advisory <ulink
|
||||
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-04:05.openssl.asc">FreeBSD-SA-04:05</ulink>
|
||||
which contains more details and instructions on how to patch existing
|
||||
systems.</para>
|
||||
|
||||
<para>No active security advisories.</para>
|
||||
]]>
|
||||
|
||||
</sect1>
|
||||
@@ -171,66 +135,38 @@
|
||||
<title>Late-Breaking News</title>
|
||||
|
||||
<![ %release.type.release [
|
||||
<para>No news.</para>
|
||||
|
||||
<para>(20 May 2004) A security problem was discovered
|
||||
in <application>CVS</application> but the release notes
|
||||
did not state that since it was very late in the release cycle.
|
||||
&os; &release.current; includes a fix for it and is not vulnerable.
|
||||
For the details, see the security advisory
|
||||
<ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-04:10.cvs.asc">FreeBSD-SA-04:10</ulink>.</para>
|
||||
|
||||
<para>(23 May 2004) As a side effect of closing a security problem
|
||||
related to &man.msync.2;, the <literal>MS_INVALIDATE</literal>
|
||||
flag no longer guarantees that all pages in the range are
|
||||
invalidated. This can cause problems when pages are backed by a remote file
|
||||
(e.g. via NFS) where other machines can write to the permanent storage since
|
||||
the local pages not being invalidated might then contain stale data. The
|
||||
security problem being addressed is a strictly local exploit, and only
|
||||
allows a local user to block the writing of data to a file under certain
|
||||
circumstances. Users who require the old semantics of
|
||||
<literal>MS_INVALIDATE</literal> and are not concerned with
|
||||
the security issue being fixed can set the
|
||||
<literal>vm.old_msync</literal> sysctl to <literal>1</literal>
|
||||
which will revert to the old (insecure) behavior.</para>
|
||||
|
||||
<para>(25 May 2004) The &man.twe.4; driver was recently updated by the
|
||||
vendor. Problems have been reported in rare circumstances under
|
||||
conditions that are hard to reproduce. Work is ongoing to isolate
|
||||
these problems and determine their source.</para>
|
||||
|
||||
|
||||
]]>
|
||||
|
||||
<![ %release.type.snapshot [
|
||||
|
||||
<para>(28 Oct 2003) Very late in the release cycle, a change was made to the
|
||||
HyperThreading (HTT) support on &intel; processors. HTT support
|
||||
is now enabled by default on SMP-capable kernels; as a result,
|
||||
the <literal>HTT</literal> kernel option is unnecessary and has
|
||||
been removed. The extra logical CPUs are always started so that
|
||||
they can handle interrupts, but are prevented from executing
|
||||
user processes by default. To enable the logical CPUs, change
|
||||
the value of the <varname>machdep.hlt_logical_cpus</varname>
|
||||
&man.sysctl.8; variable from <literal>1</literal> to
|
||||
<literal>0</literal>. This value can also be set from the
|
||||
loader as a tunable of the same name. This behavior is now
|
||||
identical to &os; 5.<replaceable>X</replaceable>.</para>
|
||||
|
||||
<para>(29 Oct 2003) Some of the packages contained in the first CD-ROM depend on
|
||||
different versions of the <application>OpenLDAP</application>
|
||||
packages, which cannot co-exist on the same host. One
|
||||
manifestation of this problem is that it is not possible to
|
||||
install both the <filename role="package">x11/gnome2</filename>
|
||||
and <filename role="package">x11/kde3</filename>
|
||||
packages.</para>
|
||||
|
||||
<para>(30 Oct 2003) It appears that the
|
||||
<filename>crypto</filename> distribution is required for correct
|
||||
functioning of the &os; base system. At the very least, the
|
||||
libraries contained in the <filename>crypto</filename>
|
||||
distribution are required for &man.pkg.add.1;.</para>
|
||||
|
||||
<para>(30 Oct 2003) There are known cases of fairly-recent i386
|
||||
machines with BIOSes that do not support booting from emulation
|
||||
mode El Torito CDROMs. This prevents booting from the &os;
|
||||
&release.current; CDROMs. As a workaround, download the floppy
|
||||
disk images, use them to boot the machine into
|
||||
&man.sysinstall.8;, and then do a CDROM install. This problem
|
||||
does not seem to be wide-spread as of this writing.
|
||||
|
||||
<note>
|
||||
<para>&os; 5.<replaceable>X</replaceable> uses non-emulation
|
||||
El Torito booting on its CDROM releases by default. These,
|
||||
of course, cannot be booted on very old i386 machines that
|
||||
only support emulation mode.</para>
|
||||
</note>
|
||||
|
||||
</para>
|
||||
|
||||
<para>(10 Nov 2003) An update was made to the
|
||||
<literal>xterm</literal> entry in the &man.termcap.5; database
|
||||
which, among other things, removed the (already deprecated)
|
||||
<literal>bs</literal> backspacing capability. The &man.hack.6;
|
||||
game appears to depend on this capability and hence fails when
|
||||
run from inside a window with a terminal type of
|
||||
<literal>xterm</literal>.</para>
|
||||
|
||||
<para>(10 Nov 2003) Tagged queueing in the &man.ata.4; driver
|
||||
is broken and appears to cause kernel panics.</para>
|
||||
|
||||
<para>No news.</para>
|
||||
]]>
|
||||
</sect1>
|
||||
</article>
|
||||
@@ -10,6 +10,7 @@
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<year>2003</year>
|
||||
<year>2004</year>
|
||||
<holder role="mailto:[email protected]">The FreeBSD Documentation Project</holder>
|
||||
</copyright>
|
||||
</articleinfo>
|
||||
@@ -12,6 +12,7 @@
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<year>2003</year>
|
||||
<year>2004</year>
|
||||
<holder role="mailto:[email protected]">The FreeBSD Documentation Project</holder>
|
||||
</copyright>
|
||||
</articleinfo>
|
||||
@@ -24,6 +24,7 @@
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<year>2003</year>
|
||||
<year>2004</year>
|
||||
<holder role="mailto:[email protected]">The FreeBSD Documentation Project</holder>
|
||||
</copyright>
|
||||
</articleinfo>
|
||||
|
||||
@@ -55,6 +55,11 @@
|
||||
url="http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/">FreeBSD
|
||||
Handbook</ulink>.</para>
|
||||
|
||||
<para>For significant information discovered after the release
|
||||
or last-minute changes in the release cycle to be otherwise
|
||||
included in the release documentation, please read
|
||||
<ulink url="http://www.FreeBSD.org/releases/4.10R/errata.html">Errata</ulink>
|
||||
document.</para>
|
||||
]]>
|
||||
</sect1>
|
||||
|
||||
@@ -129,6 +134,16 @@
|
||||
on the server when accessing remote CVS repositories.
|
||||
More details can be found in security advisory <ulink
|
||||
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-04:07.cvs.asc">FreeBSD-SA-04:07</ulink>.</para>
|
||||
|
||||
<para>A bugfix for <application>Heimdal</application> rectifies a
|
||||
problem in which it would not perform adequate checking of
|
||||
authentication across autonomous realms. For more information,
|
||||
see security advisory <ulink
|
||||
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-04:08.heimdal.asc">FreeBSD-SA-04:08</ulink>.</para>
|
||||
|
||||
<para>A fix in &man.kadmind.8; closes a potential buffer overflow.
|
||||
Details can be found in security advisory <ulink
|
||||
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-04:09.kadmind.asc">FreeBSD-SA-04:09</ulink>.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="kernel">
|
||||
@@ -153,6 +168,9 @@
|
||||
&man.dconschat.8; utility provides user access to &man.dcons.4;
|
||||
devices.</para>
|
||||
|
||||
<para>A bug in &man.mmap.2; that pages marked as <literal>PROT_NONE</literal>
|
||||
may become readable under certain circumstances, has been fixed.</para>
|
||||
|
||||
<para>The &man.stl.4; driver has been updated to version 5.6.0b1.</para>
|
||||
|
||||
<para>The &man.umct.4; driver, which provides support for USB to RS-232
|
||||
@@ -221,6 +239,11 @@
|
||||
for authenticating TCP sessions. &man.setkey.8; now includes
|
||||
support for the TCP-MD5 class of security associations.</para>
|
||||
|
||||
<para>The random ephemeral port allocation, which come from OpenBSD
|
||||
has been implemented. This is enabled by default and can be disabled
|
||||
using the <varname>net.inet.ip.portrange.randomized</varname>
|
||||
sysctl.</para>
|
||||
|
||||
<para>The &man.ng.vlan.4; NetGraph node type, which supports
|
||||
IEEE 802.1Q VLAN tagging has been added.</para>
|
||||
</sect3>
|
||||
@@ -386,7 +409,7 @@
|
||||
</para>
|
||||
|
||||
<para>The supported release of <application>KDE</application>
|
||||
has been updated from 3.1.4 to 3.2.1.</para>
|
||||
has been updated from 3.1.4 to 3.2.2.</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
|
||||
@@ -35,16 +35,6 @@
|
||||
(list (list "HREF" "mailto:[email protected]"))
|
||||
(literal "[email protected]"))
|
||||
(literal ">.")
|
||||
(make element gi: "p"
|
||||
attributes: (list (list "align" "center"))
|
||||
(make element gi: "small"
|
||||
(literal "All users of FreeBSD ")
|
||||
(literal (entity-text "release.branch"))
|
||||
(literal " should subscribe to the ")
|
||||
(literal "<")
|
||||
(create-link (list (list "HREF" "mailto:[email protected]"))
|
||||
(literal "[email protected]"))
|
||||
(literal "> mailing list.")))
|
||||
|
||||
(make element gi: "p"
|
||||
attributes: (list (list "align" "center"))
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# $FreeBSD$
|
||||
# Original revision: 1.6
|
||||
|
||||
RELN_ROOT?= ${.CURDIR}/../..
|
||||
|
||||
SUBDIR = alpha
|
||||
SUBDIR+= amd64
|
||||
SUBDIR+= ia64
|
||||
SUBDIR+= i386
|
||||
SUBDIR+= sparc64
|
||||
SUBDIR+= pc98
|
||||
|
||||
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
|
||||
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
|
||||
@@ -1,19 +0,0 @@
|
||||
<!-- -*- sgml -*- -->
|
||||
<!--
|
||||
$FreeBSD$
|
||||
Original revision: 1.5
|
||||
-->
|
||||
|
||||
<!-- Text constants which probably don't need to be changed.-->
|
||||
|
||||
<!-- Files to be included -->
|
||||
|
||||
<!ENTITY artheader SYSTEM "../common/artheader.sgml">
|
||||
<!ENTITY sect.intro SYSTEM "../common/intro.sgml">
|
||||
<!ENTITY sect.proc.alpha SYSTEM "../alpha/proc-alpha.sgml">
|
||||
<!ENTITY sect.proc.amd64 SYSTEM "../amd64/proc-amd64.sgml">
|
||||
<!ENTITY sect.proc.i386 SYSTEM "../i386/proc-i386.sgml">
|
||||
<!ENTITY sect.proc.ia64 SYSTEM "../ia64/proc-ia64.sgml">
|
||||
<!ENTITY sect.proc.sparc64 SYSTEM "../sparc64/proc-sparc64.sgml">
|
||||
<!ENTITY sect.proc.pc98 SYSTEM "../pc98/proc-pc98.sgml">
|
||||
<!ENTITY sect.dev SYSTEM "../common/dev.sgml">
|
||||
@@ -12,7 +12,7 @@ UNITEXTS= readme errata
|
||||
|
||||
IMAGEDIR= .imagedir
|
||||
RHOST= freefall.freebsd.org
|
||||
RDIR= public_html/relnotes/4-STABLE
|
||||
RDIR= public_html/relnotes/4.10-RELEASE
|
||||
DOCDIR= ./release/doc
|
||||
LANG= en_US.ISO8859-1
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<!-- Version of the OS we're describing. This needs to be updated
|
||||
with each new release. -->
|
||||
<!ENTITY release.current "4.10-BETA">
|
||||
<!ENTITY release.current "4.10-RELEASE">
|
||||
|
||||
<!-- The previous version used for comparison in the "What's New"
|
||||
section. For -CURRENT, we might point back to the last
|
||||
@@ -14,26 +14,26 @@
|
||||
<!ENTITY release.prev "4.9-RELEASE">
|
||||
|
||||
<!-- The next version to be released, usually used for snapshots. -->
|
||||
<!ENTITY release.next "4.10-RELEASE">
|
||||
<!ENTITY release.next "4.11-RELEASE">
|
||||
|
||||
<!-- The name of this branch. -->
|
||||
<!ENTITY release.branch "4-STABLE">
|
||||
|
||||
<!-- The URL for obtaining this version of FreeBSD. -->
|
||||
<!ENTITY release.url "http://snapshots.jp.FreeBSD.org/">
|
||||
<!ENTITY release.url "ftp://ftp.FreeBSD.org/">
|
||||
|
||||
<!-- The type of release (usually this will be either "snapshot"
|
||||
or "release" -->
|
||||
<!ENTITY release.type "snapshot">
|
||||
<!ENTITY % release.type.snapshot "INCLUDE">
|
||||
<!ENTITY % release.type.release "IGNORE">
|
||||
<!ENTITY release.type "release">
|
||||
<!ENTITY % release.type.snapshot "IGNORE">
|
||||
<!ENTITY % release.type.release "INCLUDE">
|
||||
|
||||
<!-- The manpaths for man page references -->
|
||||
<!ENTITY release.man.url "http://www.FreeBSD.org/cgi/man.cgi">
|
||||
<!ENTITY release.manpath.xfree86 "4.3.0">
|
||||
<!ENTITY release.manpath.netbsd "1.6.1">
|
||||
<!ENTITY release.manpath.freebsd-ports "Ports">
|
||||
<!ENTITY release.manpath.freebsd "4.8-stable">
|
||||
<!ENTITY release.manpath.freebsd "4.10-RELEASE">
|
||||
|
||||
<!-- Text constants which probably don't need to be changed.-->
|
||||
|
||||
|
||||
@@ -89,9 +89,11 @@ CDROM_SET_1="${CDROM_SET_1} x11-servers/XFree86-4-PrintServer"
|
||||
CDROM_SET_1="${CDROM_SET_1} x11-servers/XFree86-4-Server"
|
||||
CDROM_SET_1="${CDROM_SET_1} x11-servers/XFree86-4-VirtualFramebufferServer"
|
||||
CDROM_SET_1="${CDROM_SET_1} x11-wm/afterstep"
|
||||
if [ "X${PKG_ARCH}" != "Xalpha" ]; then
|
||||
CDROM_SET_1="${CDROM_SET_1} x11-wm/enlightenment"
|
||||
CDROM_SET_1="${CDROM_SET_1} x11-wm/fvwm2"
|
||||
CDROM_SET_1="${CDROM_SET_1} x11-wm/sawfish2"
|
||||
fi
|
||||
CDROM_SET_1="${CDROM_SET_1} x11-wm/fvwm2"
|
||||
CDROM_SET_1="${CDROM_SET_1} x11-wm/windowmaker"
|
||||
CDROM_SET_1="${CDROM_SET_1} x11/XFree86-4"
|
||||
CDROM_SET_1="${CDROM_SET_1} x11/XFree86-4-clients"
|
||||
@@ -107,16 +109,13 @@ CDROM_SET_1="${CDROM_SET_1} www/links"
|
||||
CDROM_SET_1="${CDROM_SET_1} astro/xearth"
|
||||
CDROM_SET_1="${CDROM_SET_1} editors/emacs"
|
||||
CDROM_SET_1="${CDROM_SET_1} editors/vim-lite"
|
||||
CDROM_SET_1="${CDROM_SET_1} editors/vim"
|
||||
#CDROM_SET_1="${CDROM_SET_1} editors/vim"
|
||||
CDROM_SET_1="${CDROM_SET_1} emulators/mtools"
|
||||
CDROM_SET_1="${CDROM_SET_1} graphics/xv"
|
||||
CDROM_SET_1="${CDROM_SET_1} irc/xchat2"
|
||||
CDROM_SET_1="${CDROM_SET_1} mail/fetchmail"
|
||||
CDROM_SET_1="${CDROM_SET_1} mail/mutt"
|
||||
CDROM_SET_1="${CDROM_SET_1} mail/pine4"
|
||||
CDROM_SET_1="${CDROM_SET_1} mail/popd"
|
||||
CDROM_SET_1="${CDROM_SET_1} mail/xfmail"
|
||||
CDROM_SET_1="${CDROM_SET_1} misc/bsdiff"
|
||||
CDROM_SET_1="${CDROM_SET_1} misc/screen"
|
||||
CDROM_SET_1="${CDROM_SET_1} net/cvsup"
|
||||
CDROM_SET_1="${CDROM_SET_1} net/rsync"
|
||||
@@ -124,12 +123,6 @@ CDROM_SET_1="${CDROM_SET_1} net/samba"
|
||||
CDROM_SET_1="${CDROM_SET_1} news/slrn"
|
||||
CDROM_SET_1="${CDROM_SET_1} news/tin"
|
||||
CDROM_SET_1="${CDROM_SET_1} print/a2ps-letter"
|
||||
if [ "X${PKG_ARCH}" = "Xalpha" ]; then
|
||||
CDROM_SET_1="${CDROM_SET_1} print/acroread4"
|
||||
fi
|
||||
if [ "X${PKG_ARCH}" = "Xi386" ]; then
|
||||
CDROM_SET_1="${CDROM_SET_1} print/acroread5"
|
||||
fi
|
||||
CDROM_SET_1="${CDROM_SET_1} print/apsfilter"
|
||||
CDROM_SET_1="${CDROM_SET_1} print/ghostscript-gnu-nox11"
|
||||
CDROM_SET_1="${CDROM_SET_1} print/gv"
|
||||
@@ -143,22 +136,12 @@ CDROM_SET_1="${CDROM_SET_1} shells/pdksh"
|
||||
CDROM_SET_1="${CDROM_SET_1} shells/zsh"
|
||||
CDROM_SET_1="${CDROM_SET_1} sysutils/portupgrade"
|
||||
CDROM_SET_1="${CDROM_SET_1} www/lynx"
|
||||
CDROM_SET_1="${CDROM_SET_1} www/mozilla"
|
||||
CDROM_SET_1="${CDROM_SET_1} www/netscape-remote"
|
||||
CDROM_SET_1="${CDROM_SET_1} www/netscape-wrapper"
|
||||
CDROM_SET_1="${CDROM_SET_1} www/netscape48-communicator"
|
||||
CDROM_SET_1="${CDROM_SET_1} www/opera"
|
||||
CDROM_SET_1="${CDROM_SET_1} x11/rxvt"
|
||||
|
||||
# VERY common build dependencies
|
||||
CDROM_SET_1="${CDROM_SET_1} archivers/unzip"
|
||||
CDROM_SET_1="${CDROM_SET_1} devel/gmake"
|
||||
CDROM_SET_1="${CDROM_SET_1} graphics/png"
|
||||
if [ "X${PKG_ARCH}" = "Xi386" ]; then
|
||||
CDROM_SET_1="${CDROM_SET_1} misc/compat22"
|
||||
fi
|
||||
if [ "X${PKG_ARCH}" = "Xi386" -o "X${PKG_ARCH}" = "Xalpha" ]; then
|
||||
CDROM_SET_1="${CDROM_SET_1} misc/compat3x"
|
||||
CDROM_SET_1="${CDROM_SET_1} misc/compat4x"
|
||||
fi
|
||||
|
||||
|
||||
@@ -93,6 +93,9 @@ moduleInitialize(void)
|
||||
}
|
||||
}
|
||||
closedir(dirp);
|
||||
msgDebug("Sleeping to allow device discovery...\n");
|
||||
sleep(1);
|
||||
msgDebug("Finished sleeping to allow device discovery\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
*default host=CHANGE_THIS.FreeBSD.org
|
||||
*default base=/usr
|
||||
*default prefix=/usr
|
||||
*default release=cvs tag=RELENG_4
|
||||
*default release=cvs tag=RELENG_4_10
|
||||
*default delete use-rel-suffix
|
||||
|
||||
# If your network link is a T1 or faster, comment out the following line.
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
.\" Copyright (c) 2004
|
||||
.\" Ivan Sharov <[email protected]>. All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by Ivan Sharov.
|
||||
.\" 4. Neither the name of the author nor the names of any co-contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY Ivan Sharov AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL Ivan Sharov OR THE VOICES IN HIS HEAD
|
||||
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
.\" THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 26, 2003
|
||||
.Dt ARL 4 i386
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm arl
|
||||
.Nd "Aironet Arlan 655 wireless network adapter driver"
|
||||
.Sh SYNOPSIS
|
||||
.Cd "device arl"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
driver provides support for Aironet Arlan 655
|
||||
wireless network adapters.
|
||||
The Arlan 655 series adapters operate at 354kbps, 512kbps, 1Mbps and 2Mbps.
|
||||
.Pp
|
||||
The Aironet Arlan 655 devices support Aironet TMA, Aironet Non-TMA
|
||||
and PSP operating modes.
|
||||
.Pp
|
||||
By default, the
|
||||
.Nm
|
||||
driver configures the Aironet Arlan 655 card for TMA operation.
|
||||
.Pp
|
||||
To set up Radio Network parameters, use
|
||||
.Xr arlconfig 8 .
|
||||
.Sh SEE ALSO
|
||||
.Xr arp 4 ,
|
||||
.Xr netintro 4 ,
|
||||
.Xr arlconfig 8 ,
|
||||
.Xr ifconfig 8
|
||||
.Sh LIMITATIONS
|
||||
When using
|
||||
.Xr ifconfig 8
|
||||
for setting
|
||||
.Ar SSID
|
||||
you must use a 4-byte even hexadecimal digit value and it must start with
|
||||
00 or 02.
|
||||
.Pp
|
||||
You can change
|
||||
.Ar channel
|
||||
for current
|
||||
.Ar country
|
||||
only through
|
||||
.Xr ifconfig 8 .
|
||||
You must use
|
||||
.Xr arlconfig 8
|
||||
for changing
|
||||
.Ar country .
|
||||
.Pp
|
||||
Can't change lladdr.
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
device driver first appeared in
|
||||
.Fx 5.3 .
|
||||
.Sh AUTHORS
|
||||
.An -nosplit
|
||||
The
|
||||
.Nm
|
||||
driver was initially written by
|
||||
.An Ivan Sharov Aq [email protected] .
|
||||
.Aq [email protected]
|
||||
wrote the arlconfig utility and added ioctl support to the driver.
|
||||
.An Stanislav Svirid Aq [email protected]
|
||||
ported this driver to the new ISA architecture, merged some al driver changes,
|
||||
fixed some bugs and made it a module.
|
||||
.An Yuri Kurenkov Aq [email protected]
|
||||
wrote this manpage.
|
||||
@@ -31,37 +31,27 @@
|
||||
.Nm ct
|
||||
.Nd "WD33C93[ABC] based CBUS SCSI host adapter driver"
|
||||
.Sh SYNOPSIS
|
||||
.Cd "device ct"
|
||||
.Cd "device scbus"
|
||||
.Pp
|
||||
In
|
||||
.Pa /boot/device.hints:
|
||||
.Pp
|
||||
For most PC-9801-55, -92 and compatibles:
|
||||
.Cd hint.ct.0.at="isa"
|
||||
.Cd "device ct0 at isa?"
|
||||
.Pp
|
||||
For ELECOM bus-master
|
||||
.Tn SCSI
|
||||
adapters:
|
||||
.Cd hint.ct.0.at="isa"
|
||||
.Cd hint.ct.0.flags="0x30000"
|
||||
.Cd "device ct0 at isa? flags=0x30000"
|
||||
.Pp
|
||||
For I-O DATA SC98 adapters:
|
||||
.Cd hint.ct.0.at="isa"
|
||||
.Cd hint.ct.0.flags="0x10000"
|
||||
.Cd "device ct0 at isa? flags=0x10000"
|
||||
.Pp
|
||||
For LOGITEC adapters:
|
||||
.Cd hint.ct.0.at="isa"
|
||||
.Cd hint.ct.0.flags="0x50000"
|
||||
.Cd "device ct0 at isa? flags=0x50000"
|
||||
.Pp
|
||||
For TEXA adapters:
|
||||
.Cd hint.ct.0.at="isa"
|
||||
.Cd hint.ct.0.flags="0x20000"
|
||||
.Cd "device ct0 at isa? flags=0x20000"
|
||||
.Pp
|
||||
For adapters with SMIT transfer mode to enable SMIT transfer:
|
||||
.Cd hint.ct.0.at="isa"
|
||||
.Cd hint.ct.0.flags="0x40000"
|
||||
.Cd hint.ct.0.maddr="0xdc000"
|
||||
.Cd "device ct0 at isa? iomem 0xdc000 flags=0x40000"
|
||||
.Pp
|
||||
.Ar Flag
|
||||
meaning:
|
||||
|
||||
@@ -20,19 +20,15 @@
|
||||
.Nm ctau
|
||||
.Nd driver for synchronous Cronyx Tau WAN adapters
|
||||
.Sh SYNOPSIS
|
||||
.Cd "device ctau0 at isa? port 0x240 irq 15 drq 7"
|
||||
or
|
||||
.Cd "device ctau"
|
||||
for autodetection.
|
||||
.Pp
|
||||
Additional options:
|
||||
.Cd "device sppp"
|
||||
.Cd "options NETGRAPH"
|
||||
.Cd "options NETGRAPH_CRONYX"
|
||||
.Pp
|
||||
In
|
||||
.Pa /boot/device.hints :
|
||||
.Cd hint.ctau.0.at="isa"
|
||||
.Cd hint.ctau.0.port="0x240"
|
||||
.Cd hint.ctau.0.irq="15"
|
||||
.Cd hint.ctau.0.drq="7"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
@@ -51,7 +47,7 @@ Otherwise, it will be compiled with
|
||||
support.
|
||||
.Pp
|
||||
The base I/O port address specified in
|
||||
.Pa /boot/device.hints
|
||||
.Pa /sys/i386/conf/<YOUR_KERN_CONF>
|
||||
must match the port address set by the jumpers on the board.
|
||||
The DMA I/O channel and interrupt request numbers are configured
|
||||
by software at adapter initialization.
|
||||
|
||||
@@ -20,19 +20,15 @@
|
||||
.Nm cx
|
||||
.Nd driver for synchronous/asynchronous Cronyx Sigma WAN adapters
|
||||
.Sh SYNOPSIS
|
||||
.Cd "device cx0 at isa? port 0x240 irq 5 drq 7"
|
||||
or
|
||||
.Cd "device cx"
|
||||
for autodetection.
|
||||
.Pp
|
||||
Additional options:
|
||||
.Cd "device sppp"
|
||||
.Cd "options NETGRAPH"
|
||||
.Cd "options NETGRAPH_CRONYX"
|
||||
.Pp
|
||||
In
|
||||
.Pa /boot/device.hints :
|
||||
.Cd hint.cx.0.at="isa"
|
||||
.Cd hint.cx.0.port="0x240"
|
||||
.Cd hint.cx.0.irq="15"
|
||||
.Cd hint.cx.0.drq="7"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
@@ -51,7 +47,7 @@ Otherwise, it will be compiled with
|
||||
support.
|
||||
.Pp
|
||||
The base I/O port address specified in
|
||||
.Pa /boot/device.hints
|
||||
.Pa /sys/i386/conf/<YOUR_KERN_CONF>
|
||||
must match the port address set by the jumpers on the board.
|
||||
The DMA I/O channel and interrupt request numbers are configured
|
||||
by software at adapter initialization.
|
||||
@@ -80,6 +76,7 @@ for information about the
|
||||
.Nm
|
||||
adapter configuration.
|
||||
.Sh SEE ALSO
|
||||
.Xr ctau 4 ,
|
||||
.Xr sppp 4 ,
|
||||
.Xr ifconfig 8 ,
|
||||
.Xr sconfig 8 ,
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
.\" Copyright (c) 2004 Ruslan Ermilov
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd April 17, 2004
|
||||
.Dt NG_HUB 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm ng_hub
|
||||
.Nd packet distribution netgraph node type
|
||||
.Sh SYNOPSIS
|
||||
.In netgraph/ng_hub.h
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm hub
|
||||
node type provides a simple mechanism for distributing packets over
|
||||
several links.
|
||||
Packets received on any of the hooks are forwarded out the other hooks.
|
||||
Packets are not altered in any way.
|
||||
.Sh HOOKS
|
||||
A
|
||||
.Nm hub
|
||||
node accepts any request to connect, regardless of the hook name,
|
||||
as long as the name is unique.
|
||||
.Sh CONTROL MESSAGES
|
||||
This node type supports only the generic control messages.
|
||||
.Sh SHUTDOWN
|
||||
This node shuts down upon receipt of a
|
||||
.Dv NGM_SHUTDOWN
|
||||
control message, or when all hooks have been disconnected.
|
||||
.Sh SEE ALSO
|
||||
.Xr netgraph 4 ,
|
||||
.Xr ng_bridge 4 ,
|
||||
.Xr ng_ether 4 ,
|
||||
.Xr ng_one2many 4 ,
|
||||
.Xr ngctl 8 ,
|
||||
.Xr nghook 8
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
node type appeared in
|
||||
.Fx 5.3 .
|
||||
.Sh AUTHORS
|
||||
.An Ruslan Ermilov Aq [email protected]
|
||||
@@ -251,6 +251,22 @@ environment immediately after any local patches are applied.
|
||||
.It Va MAKE_ISOS
|
||||
If defined, bootable ISO CD-ROM images will be created from the
|
||||
contents of the CD-ROM stage directory.
|
||||
.It Va DISC1_LABEL
|
||||
The label used for the CD-ROM created from the disc1 contents, the
|
||||
default label will be
|
||||
.Dq fbsd_miniinst .
|
||||
.It Va DISC1_NAME
|
||||
The name used as part of the ISO file name for the CD-ROM created from
|
||||
the disc1 contents, the default will be
|
||||
.Dq miniinst .
|
||||
.It Va DISC2_LABEL
|
||||
The label used for the CD-ROM created from the disc2 contents, the
|
||||
default label will be
|
||||
.Dq fbsd_livefs .
|
||||
.It Va DISC2_NAME
|
||||
The name used as part of the ISO file name for the CD-ROM created from
|
||||
the disc2 contents, the default will be
|
||||
.Dq disc2 .
|
||||
.It Va NODOC
|
||||
If set to
|
||||
.Dq Li YES ,
|
||||
|
||||
@@ -2232,7 +2232,7 @@ pmap_kenter_temporary(vm_offset_t pa, int i)
|
||||
* faults on process startup and immediately after an mmap.
|
||||
*/
|
||||
void
|
||||
pmap_object_init_pt(pmap_t pmap, vm_offset_t addr,
|
||||
pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_prot_t prot,
|
||||
vm_object_t object, vm_pindex_t pindex,
|
||||
vm_size_t size, int limit)
|
||||
{
|
||||
@@ -2241,7 +2241,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr,
|
||||
vm_page_t p, mpte;
|
||||
int objpgs;
|
||||
|
||||
if (pmap == NULL || object == NULL)
|
||||
if ((prot & VM_PROT_READ) == 0 || pmap == NULL || object == NULL)
|
||||
return;
|
||||
|
||||
psize = alpha_btop(size);
|
||||
|
||||
@@ -54,6 +54,48 @@ void atomic_clear_64(u_int64_t *, u_int64_t);
|
||||
void atomic_add_64(u_int64_t *, u_int64_t);
|
||||
void atomic_subtract_64(u_int64_t *, u_int64_t);
|
||||
|
||||
static __inline u_int32_t
|
||||
atomic_readandclear_32(volatile u_int32_t *addr)
|
||||
{
|
||||
u_int32_t result,temp;
|
||||
|
||||
__asm __volatile (
|
||||
"wmb\n" /* ensure pending writes have drained */
|
||||
"1:\tldl_l %0,%3\n\t" /* load current value, asserting lock */
|
||||
"ldiq %1,0\n\t" /* value to store */
|
||||
"stl_c %1,%2\n\t" /* attempt to store */
|
||||
"beq %1,2f\n\t" /* if the store failed, spin */
|
||||
"br 3f\n" /* it worked, exit */
|
||||
"2:\tbr 1b\n" /* *addr not updated, loop */
|
||||
"3:\tmb\n" /* it worked */
|
||||
: "=&r"(result), "=&r"(temp), "=m" (*addr)
|
||||
: "m"(*addr)
|
||||
: "memory");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static __inline u_int64_t
|
||||
atomic_readandclear_64(volatile u_int64_t *addr)
|
||||
{
|
||||
u_int64_t result,temp;
|
||||
|
||||
__asm __volatile (
|
||||
"wmb\n" /* ensure pending writes have drained */
|
||||
"1:\tldq_l %0,%3\n\t" /* load current value, asserting lock */
|
||||
"ldiq %1,0\n\t" /* value to store */
|
||||
"stq_c %1,%2\n\t" /* attempt to store */
|
||||
"beq %1,2f\n\t" /* if the store failed, spin */
|
||||
"br 3f\n" /* it worked, exit */
|
||||
"2:\tbr 1b\n" /* *addr not updated, loop */
|
||||
"3:\tmb\n" /* it worked */
|
||||
: "=&r"(result), "=&r"(temp), "=m" (*addr)
|
||||
: "m"(*addr)
|
||||
: "memory");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#define atomic_set_char atomic_set_8
|
||||
#define atomic_clear_char atomic_clear_8
|
||||
#define atomic_add_char atomic_add_8
|
||||
@@ -68,10 +110,12 @@ void atomic_subtract_64(u_int64_t *, u_int64_t);
|
||||
#define atomic_clear_int atomic_clear_32
|
||||
#define atomic_add_int atomic_add_32
|
||||
#define atomic_subtract_int atomic_subtract_32
|
||||
#define atomic_readandclear_int atomic_readandclear_32
|
||||
|
||||
#define atomic_set_long atomic_set_64
|
||||
#define atomic_clear_long atomic_clear_64
|
||||
#define atomic_add_long atomic_add_64
|
||||
#define atomic_subtract_long atomic_subtract_64
|
||||
#define atomic_readandclear_long atomic_readandclear_64
|
||||
|
||||
#endif /* ! _MACHINE_ATOMIC_H_ */
|
||||
+1
-1
@@ -36,7 +36,7 @@
|
||||
|
||||
TYPE="FreeBSD"
|
||||
REVISION="4.10"
|
||||
BRANCH="BETA"
|
||||
BRANCH="RELEASE"
|
||||
RELEASE="${REVISION}-${BRANCH}"
|
||||
VERSION="${TYPE} ${RELEASE}"
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
|
||||
#define ID_AHA_29320 0x8012900500429005ull
|
||||
#define ID_AHA_29320B 0x8013900500439005ull
|
||||
#define ID_AHA_39320_B 0x8015900500409005ull
|
||||
#define ID_AHA_39320_B_DELL 0x8015900501681028ull
|
||||
#define ID_AHA_39320A 0x8016900500409005ull
|
||||
#define ID_AHA_39320D 0x8011900500419005ull
|
||||
#define ID_AHA_39320D_B 0x801C900500419005ull
|
||||
@@ -167,6 +168,12 @@ struct ahd_pci_identity ahd_pci_ident_table [] =
|
||||
"Adaptec 39320 Ultra320 SCSI adapter",
|
||||
ahd_aic7902_setup
|
||||
},
|
||||
{
|
||||
ID_AHA_39320_B_DELL,
|
||||
ID_ALL_MASK,
|
||||
"Adaptec (Dell OEM) 39320 Ultra320 SCSI adapter",
|
||||
ahd_aic7902_setup
|
||||
},
|
||||
{
|
||||
ID_AHA_39320A,
|
||||
ID_ALL_MASK,
|
||||
@@ -200,7 +207,7 @@ struct ahd_pci_identity ahd_pci_ident_table [] =
|
||||
/* Generic chip probes for devices we don't know 'exactly' */
|
||||
{
|
||||
ID_AIC7901 & ID_9005_GENERIC_MASK,
|
||||
ID_DEV_VENDOR_MASK,
|
||||
ID_9005_GENERIC_MASK,
|
||||
"Adaptec AIC7901 Ultra320 SCSI adapter",
|
||||
ahd_aic7901_setup
|
||||
},
|
||||
|
||||
@@ -1,335 +0,0 @@
|
||||
/*
|
||||
* $RISS: if_arl/dev/arl/if_arl_isa.c,v 1.7 2004/03/16 05:30:38 count Exp $
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
||||
#ifdef INET
|
||||
#define ARLCACHE
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
#include <sys/module.h>
|
||||
#include <sys/bus.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/rman.h>
|
||||
|
||||
#include <net/ethernet.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
#include <net/if_mib.h>
|
||||
#include <net/if_media.h>
|
||||
|
||||
#include <isa/isavar.h>
|
||||
#include <isa/pnpvar.h>
|
||||
#include <isa/isa_common.h>
|
||||
|
||||
#include <machine/clock.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <vm/vm.h>
|
||||
#include <vm/pmap.h>
|
||||
#include <vm/vm_param.h>
|
||||
|
||||
#include <dev/arl/if_arlreg.h>
|
||||
|
||||
static void arl_isa_identify(driver_t *, device_t);
|
||||
static int arl_isa_probe (device_t);
|
||||
static int arl_isa_attach (device_t);
|
||||
static int arl_isa_detach (device_t);
|
||||
static char* arl_make_desc (u_int8_t, u_int8_t);
|
||||
|
||||
#define ARL_MAX_ATYPE_LEN 10
|
||||
static struct arl_type {
|
||||
u_int8_t type;
|
||||
char* desc;
|
||||
}
|
||||
arl_type_list[] = {
|
||||
{ 0, "450" },
|
||||
{ 1, "650" },
|
||||
{ 0xb, "670" },
|
||||
{ 0xc, "670E" },
|
||||
{ 0xd, "650E" },
|
||||
{ 0xe, "440LT" },
|
||||
{ 0x2e, "655" },
|
||||
{ 0x6b, "IC2200" },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
#define ARL_MAX_RTYPE_LEN 10
|
||||
struct radio_type {
|
||||
u_int8_t type;
|
||||
char* desc;
|
||||
} radio_type_list [] = {
|
||||
{ 1, "092/094" },
|
||||
{ 2, "020" },
|
||||
{ 3, "092A" },
|
||||
{ 4, "020B" },
|
||||
{ 5, "095" },
|
||||
{ 6, "024" },
|
||||
{ 7, "025B" },
|
||||
{ 8, "024B" },
|
||||
{ 9, "024C" },
|
||||
{10, "025C" },
|
||||
{11, "024-1A" },
|
||||
{12, "025-1A" },
|
||||
};
|
||||
|
||||
|
||||
static char*
|
||||
arl_make_desc(hw_type, radio_mod)
|
||||
u_int8_t hw_type;
|
||||
u_int8_t radio_mod;
|
||||
{
|
||||
static char desc[80];
|
||||
char atype[ARL_MAX_ATYPE_LEN], rtype[ARL_MAX_RTYPE_LEN];
|
||||
int i;
|
||||
|
||||
*atype = *rtype = 0;
|
||||
|
||||
/* arl type */
|
||||
for(i = 0; arl_type_list[i].desc; i++) {
|
||||
if (arl_type_list[i].type == hw_type)
|
||||
break;
|
||||
}
|
||||
|
||||
if (arl_type_list[i].desc)
|
||||
strncpy(atype, arl_type_list[i].desc, ARL_MAX_ATYPE_LEN);
|
||||
else
|
||||
snprintf(atype, ARL_MAX_ATYPE_LEN, "(0x%x)", hw_type);
|
||||
|
||||
/* radio type */
|
||||
for(i = 0; radio_type_list[i].desc; i++)
|
||||
if (radio_type_list[i].type == radio_mod)
|
||||
break;
|
||||
|
||||
if (radio_type_list[i].desc)
|
||||
strncpy(rtype, radio_type_list[i].desc, ARL_MAX_RTYPE_LEN);
|
||||
else
|
||||
snprintf(rtype, ARL_MAX_RTYPE_LEN, "(0x%x)", radio_mod);
|
||||
|
||||
snprintf(desc, 80, "ArLan type %s, radio module %s", atype, rtype);
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
#define ARL_ADDR2VEC(addr) (1 << ((addr - ARL_BASE_START) / ARL_BASE_STEP))
|
||||
|
||||
static void
|
||||
arl_isa_identify (driver_t *driver, device_t parent)
|
||||
{
|
||||
device_t child;
|
||||
struct arl_softc *sc;
|
||||
int chunk, found, i;
|
||||
u_int16_t free_mem = 0xFFFF;
|
||||
|
||||
if (bootverbose)
|
||||
printf("arl: in identify\n");
|
||||
|
||||
/* Try avoid already added devices */
|
||||
for (i = 0; (child = device_find_child(parent, "arl", i)) != NULL; i++) {
|
||||
chunk = bus_get_resource_start(child, SYS_RES_MEMORY, 0);
|
||||
if (bootverbose)
|
||||
device_printf(child, "found at iomem = 0x%0x\n", chunk);
|
||||
if (chunk >= ARL_BASE_START && chunk <= ARL_BASE_END)
|
||||
free_mem ^= ARL_ADDR2VEC(chunk);
|
||||
}
|
||||
|
||||
if (bootverbose)
|
||||
printf("arl: free mem vector = 0x%x\n", free_mem);
|
||||
|
||||
for (chunk = ARL_BASE_START; chunk <= ARL_BASE_END; chunk += ARL_BASE_STEP) {
|
||||
/* If device 'arl' with this chunk was found early - skip it */
|
||||
if ( !(free_mem & ARL_ADDR2VEC(chunk)) )
|
||||
continue;
|
||||
|
||||
found = 0;
|
||||
child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "arl", -1);
|
||||
device_set_driver(child, driver);
|
||||
sc = device_get_softc(child);
|
||||
bzero(sc, sizeof(*sc));
|
||||
|
||||
bus_set_resource(child, SYS_RES_MEMORY, sc->mem_rid, chunk,
|
||||
ARL_BASE_STEP);
|
||||
|
||||
if (arl_alloc_memory(child, sc->mem_rid, ARL_BASE_STEP) == 0) {
|
||||
ar = (struct arl_private *) rman_get_virtual(sc->mem_res);
|
||||
if (!bcmp(ar->textRegion, ARLAN_SIGN, sizeof(ARLAN_SIGN) - 1))
|
||||
found++;
|
||||
}
|
||||
|
||||
if (bootverbose)
|
||||
device_printf(child, "%sfound at 0x%x\n",
|
||||
!found ? "not " : "", chunk);
|
||||
|
||||
arl_release_resources(child);
|
||||
if (!found) {
|
||||
bus_delete_resource(child, SYS_RES_MEMORY, sc->mem_rid);
|
||||
device_delete_child(parent, child);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
arl_isa_probe (device_t dev)
|
||||
{
|
||||
struct arl_softc *sc = device_get_softc(dev);
|
||||
int error;
|
||||
u_char *ptr;
|
||||
u_int8_t irq;
|
||||
|
||||
if (isa_get_vendorid(dev))
|
||||
return (ENXIO);
|
||||
|
||||
if (bootverbose)
|
||||
device_printf(dev, "in probe\n");
|
||||
|
||||
bzero(sc, sizeof(struct arl_softc));
|
||||
|
||||
sc->arl_unit = device_get_unit(dev);
|
||||
|
||||
error = arl_alloc_memory(dev, 0, ARL_BASE_STEP);
|
||||
if (error) {
|
||||
if (bootverbose)
|
||||
device_printf(dev, "Error allocating memory (%d)\n", error);
|
||||
return (error);
|
||||
}
|
||||
|
||||
ar = (struct arl_private *) rman_get_virtual(sc->mem_res);
|
||||
if (bcmp(ar->textRegion, ARLAN_SIGN, sizeof(ARLAN_SIGN) - 1)) {
|
||||
if (bootverbose)
|
||||
device_printf(dev, "not found\n");
|
||||
error = ENOENT;
|
||||
goto bad;
|
||||
}
|
||||
|
||||
irq = ar->irqLevel;
|
||||
if (irq == 2)
|
||||
irq = 9;
|
||||
|
||||
error = bus_set_resource(dev, SYS_RES_IRQ, 0, irq, 1);
|
||||
if (error)
|
||||
goto bad;
|
||||
|
||||
error = arl_alloc_irq(dev, 0, 0);
|
||||
if (error) {
|
||||
if (bootverbose)
|
||||
device_printf(dev, "Can't allocate IRQ %d\n", irq);
|
||||
goto bad;
|
||||
}
|
||||
|
||||
ar->controlRegister = 1; /* freeze board */
|
||||
|
||||
/* Memory test */
|
||||
for (ptr = (u_char *) ar;
|
||||
ptr < ((u_char *) ar + ARL_BASE_STEP - 1); ptr++) {
|
||||
u_char c;
|
||||
|
||||
c = *ptr; *ptr = ~(*ptr);
|
||||
if (*ptr != (u_char)~c) {
|
||||
device_printf(dev, "board memory failed at [%lx]\n",
|
||||
rman_get_start(sc->mem_res) + (ptr - (u_char *)ar));
|
||||
break; /* skip memory test */
|
||||
}
|
||||
}
|
||||
|
||||
bzero((void *) ar, ARL_BASE_STEP - 1); /* clear board ram */
|
||||
|
||||
if (arl_wait_reset(sc, 100, ARDELAY)) {
|
||||
error = ENXIO;
|
||||
goto bad;
|
||||
}
|
||||
|
||||
if (ar->diagnosticInfo == 0xFF) {
|
||||
/* Copy arp to arpcom struct */
|
||||
bcopy(ar->lanCardNodeId, sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
|
||||
device_set_desc_copy(dev, arl_make_desc(ar->hardwareType,
|
||||
ar->radioModule));
|
||||
error = 0;
|
||||
} else {
|
||||
if (bootverbose)
|
||||
device_printf(dev, "board self-test failed (0x%x)!\n",
|
||||
ar->diagnosticInfo);
|
||||
error = ENXIO;
|
||||
}
|
||||
|
||||
bad:
|
||||
arl_release_resources(dev);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
arl_isa_attach (device_t dev)
|
||||
{
|
||||
struct arl_softc *sc = device_get_softc(dev);
|
||||
int error;
|
||||
|
||||
if (bootverbose)
|
||||
device_printf(dev, "in attach\n");
|
||||
|
||||
arl_alloc_memory(dev, sc->mem_rid, ARL_BASE_STEP);
|
||||
arl_alloc_irq(dev, sc->irq_rid, 0);
|
||||
|
||||
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
|
||||
arl_intr, sc, &sc->irq_handle);
|
||||
if (error) {
|
||||
arl_release_resources(dev);
|
||||
return (error);
|
||||
}
|
||||
|
||||
#if __FreeBSD_version < 502108
|
||||
device_printf(dev, "Ethernet address %6D\n", sc->arpcom.ac_enaddr, ":");
|
||||
#endif
|
||||
|
||||
return arl_attach(dev);
|
||||
}
|
||||
|
||||
static int
|
||||
arl_isa_detach(device_t dev)
|
||||
{
|
||||
struct arl_softc *sc = device_get_softc(dev);
|
||||
|
||||
arl_stop(sc);
|
||||
ifmedia_removeall(&sc->arl_ifmedia);
|
||||
#if __FreeBSD_version < 500100
|
||||
ether_ifdetach(&sc->arpcom.ac_if, ETHER_BPF_SUPPORTED);
|
||||
#else
|
||||
ether_ifdetach(&sc->arpcom.ac_if);
|
||||
#endif
|
||||
bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
|
||||
arl_release_resources(dev);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static device_method_t arl_isa_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_identify, arl_isa_identify),
|
||||
DEVMETHOD(device_probe, arl_isa_probe),
|
||||
DEVMETHOD(device_attach, arl_isa_attach),
|
||||
DEVMETHOD(device_detach, arl_isa_detach),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t arl_isa_driver = {
|
||||
"arl",
|
||||
arl_isa_methods,
|
||||
sizeof(struct arl_softc)
|
||||
};
|
||||
|
||||
extern devclass_t arl_devclass;
|
||||
|
||||
DRIVER_MODULE(arl, isa, arl_isa_driver, arl_devclass, 0, 0);
|
||||
MODULE_DEPEND(arl, isa, 1, 1, 1);
|
||||
MODULE_DEPEND(arl, ether, 1, 1, 1);
|
||||
@@ -1,313 +0,0 @@
|
||||
/*
|
||||
* $RISS: if_arl/dev/arl/if_arlreg.h,v 1.4 2004/03/16 04:43:27 count Exp $
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _IF_ARLREG_H
|
||||
#define _IF_ARLREG_H
|
||||
|
||||
#define ARL_BASE_START 0xC0000
|
||||
#define ARL_BASE_END 0xDE000
|
||||
#define ARL_BASE_STEP 0x2000
|
||||
|
||||
#define ARLAN_NAME_SIZE 16
|
||||
#define ARLAN_NAME "ArLan655-SCT"
|
||||
|
||||
/*
|
||||
* Statistics
|
||||
*/
|
||||
struct arl_stats {
|
||||
u_int32_t numDatagramsTransmitted;
|
||||
u_int32_t numReTransmissions;
|
||||
u_int32_t numFramesDiscarded;
|
||||
u_int32_t numDatagramsReceived;
|
||||
u_int32_t numDuplicateReceivedFrames;
|
||||
u_int32_t numDatagramsDiscarded;
|
||||
u_int16_t maxNumReTransmitDatagram;
|
||||
u_int16_t maxNumReTransmitFrames;
|
||||
u_int16_t maxNumConsecutiveDuplicateFrames;
|
||||
u_int32_t numBytesTransmitted;
|
||||
u_int32_t numBytesReceived;
|
||||
u_int32_t numCRCErrors;
|
||||
u_int32_t numLengthErrors;
|
||||
u_int32_t numAbortErrors;
|
||||
u_int32_t numTXUnderruns;
|
||||
u_int32_t numRXOverruns;
|
||||
u_int32_t numHoldOffs;
|
||||
u_int32_t numFramesTransmitted;
|
||||
u_int32_t numFramesReceived;
|
||||
u_int32_t numReceiveFramesLost;
|
||||
u_int32_t numRXBufferOverflows;
|
||||
u_int32_t numFramesDiscardedAddrMismatch;
|
||||
u_int32_t numFramesDiscardedSIDMismatch;
|
||||
u_int32_t numPollsTransmistted;
|
||||
u_int32_t numPollAcknowledges;
|
||||
u_int32_t numStatusVectorTimeouts;
|
||||
u_int32_t numNACKReceived;
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
* Arlan private structure in memomory
|
||||
*/
|
||||
struct arl_private {
|
||||
/* Header Signature */
|
||||
char textRegion[48];
|
||||
u_int8_t resetFlag;
|
||||
u_int8_t diagnosticInfo;
|
||||
u_int16_t diagnosticOffset;
|
||||
u_int8_t _1[12];
|
||||
u_int8_t lanCardNodeId[6];
|
||||
u_int8_t broadcastAddress[6];
|
||||
u_int8_t hardwareType;
|
||||
u_int8_t majorHardwareVersion;
|
||||
u_int8_t minorHardwareVersion;
|
||||
u_int8_t radioModule;
|
||||
u_int8_t defaultChannelSet;
|
||||
u_int8_t _2[47];
|
||||
|
||||
/* Control/Status Block - 0x0080 */
|
||||
u_int8_t interruptInProgress;
|
||||
u_int8_t cntrlRegImage;
|
||||
u_int8_t _3[14];
|
||||
u_int8_t commandByte;
|
||||
u_int8_t commandParameter[15];
|
||||
|
||||
/* Receive Status - 0x00a0 */
|
||||
u_int8_t rxStatusVector;
|
||||
u_int8_t rxFrmType;
|
||||
u_int16_t rxOffset;
|
||||
u_int16_t rxLength;
|
||||
u_int8_t rxSrc[6];
|
||||
u_int8_t rxBroadcastFlag;
|
||||
u_int8_t rxQuality;
|
||||
u_int8_t scrambled;
|
||||
u_int8_t _4[1];
|
||||
|
||||
/* Transmit Status - 0x00b0 */
|
||||
u_int8_t txStatusVector;
|
||||
u_int8_t txAckQuality;
|
||||
u_int8_t numRetries;
|
||||
u_int8_t _5[14];
|
||||
u_int8_t registeredRouter[6];
|
||||
u_int8_t backboneRouter[6];
|
||||
u_int8_t registrationStatus;
|
||||
u_int8_t configuredStatusFlag;
|
||||
u_int8_t _6[1];
|
||||
u_int8_t ultimateDestAddress[6];
|
||||
u_int8_t immedDestAddress[6];
|
||||
u_int8_t immedSrcAddress[6];
|
||||
u_int16_t rxSequenceNumber;
|
||||
u_int8_t assignedLocaltalkAddress;
|
||||
u_int8_t _7[27];
|
||||
|
||||
/* System Parameter Block */
|
||||
|
||||
/* - Driver Parameters (Novell Specific) */
|
||||
|
||||
u_int16_t txTimeout;
|
||||
u_int16_t transportTime;
|
||||
u_int8_t _8[4];
|
||||
|
||||
/* - Configuration Parameters */
|
||||
u_int8_t irqLevel;
|
||||
u_int8_t spreadingCode;
|
||||
u_int8_t channelSet;
|
||||
u_int8_t channelNumber;
|
||||
u_int16_t radioNodeId;
|
||||
u_int8_t _9[2];
|
||||
u_int8_t scramblingDisable;
|
||||
u_int8_t radioType;
|
||||
u_int16_t routerId;
|
||||
u_int8_t _10[9];
|
||||
u_int8_t txAttenuation;
|
||||
u_int8_t systemId[4]; /* on an odd address for a long !!! */
|
||||
u_int16_t globalChecksum;
|
||||
u_int8_t _11[4];
|
||||
u_int16_t maxDatagramSize;
|
||||
u_int16_t maxFrameSize;
|
||||
u_int8_t maxRetries;
|
||||
u_int8_t receiveMode;
|
||||
u_int8_t priority;
|
||||
u_int8_t rootOrRepeater;
|
||||
u_int8_t specifiedRouter[6];
|
||||
u_int16_t fastPollPeriod;
|
||||
u_int8_t pollDecay;
|
||||
u_int8_t fastPollDelay[2];
|
||||
u_int8_t arlThreshold;
|
||||
u_int8_t arlDecay;
|
||||
u_int8_t _12[1];
|
||||
u_int16_t specRouterTimeout;
|
||||
u_int8_t _13[5];
|
||||
|
||||
/* Scrambled Area */
|
||||
u_int8_t SID[4];
|
||||
u_int8_t encryptionKey[12];
|
||||
u_int8_t _14[2];
|
||||
u_int8_t waitTime[2];
|
||||
u_int8_t lParameter[2];
|
||||
u_int8_t _15[3];
|
||||
u_int16_t headerSize;
|
||||
u_int16_t sectionChecksum;
|
||||
|
||||
u_int8_t registrationMode;
|
||||
u_int8_t registrationFill;
|
||||
u_int16_t pollPeriod;
|
||||
u_int16_t refreshPeriod;
|
||||
u_int8_t name[ARLAN_NAME_SIZE];
|
||||
u_int8_t NID[6];
|
||||
u_int8_t localTalkAddress;
|
||||
u_int8_t codeFormat;
|
||||
u_int8_t SSCode[64];
|
||||
|
||||
u_int8_t _16[0x140];
|
||||
|
||||
/* Statistics Block - 0x0300 */
|
||||
u_int8_t hostcpuLock;
|
||||
u_int8_t lancpuLock;
|
||||
u_int8_t resetTime[18];
|
||||
|
||||
struct arl_stats stat;
|
||||
|
||||
u_int8_t _17[0x86];
|
||||
|
||||
u_int8_t txBuffer[0x800];
|
||||
u_int8_t rxBuffer[0x800];
|
||||
|
||||
u_int8_t _18[0x0bfd];
|
||||
u_int8_t resetFlag1;
|
||||
u_int8_t _19;
|
||||
u_int8_t controlRegister;
|
||||
};
|
||||
|
||||
/*
|
||||
* Transmit parametrs
|
||||
*/
|
||||
struct arl_tx_param {
|
||||
u_int16_t offset;
|
||||
u_int16_t length;
|
||||
u_int8_t dest[6];
|
||||
u_int8_t clear;
|
||||
u_int8_t retries;
|
||||
u_int8_t routing;
|
||||
u_int8_t scrambled;
|
||||
};
|
||||
|
||||
#define ARL_HARDWARE_RESET 0x01
|
||||
#define ARL_CHANNEL_ATTENTION 0x02
|
||||
#define ARL_INTERRUPT_ENABLE 0x04
|
||||
#define ARL_CLEAR_INTERRUPT 0x08
|
||||
|
||||
/* additions for sys/sockio.h ( socket ioctl parameters for arlan card ) */
|
||||
|
||||
#define SIOCGARLQLT _IOWR('i', 70, struct ifreq) /* get QUALITY */
|
||||
#define SIOCGARLALL _IOWR('i', 71, struct ifreq) /* get ALL */
|
||||
#define SIOCSARLALL _IOWR('i', 72, struct ifreq) /* set paramter (who_set) */
|
||||
#define SIOCGARLSTB _IOWR('i', 73, struct ifreq) /* get statistic block */
|
||||
|
||||
/*
|
||||
* Arlan request struct via ioctl
|
||||
*/
|
||||
struct arl_cfg_param {
|
||||
u_char name[ARLAN_NAME_SIZE];
|
||||
u_int8_t sid[4];
|
||||
u_int8_t channelSet;
|
||||
u_int8_t channelNumber;
|
||||
u_int8_t spreadingCode;
|
||||
u_int8_t registrationMode;
|
||||
u_int8_t lanCardNodeId[6];
|
||||
u_int8_t specifiedRouter[6];
|
||||
u_int8_t hardwareType;
|
||||
u_int8_t majorHardwareVersion;
|
||||
u_int8_t minorHardwareVersion;
|
||||
u_int8_t radioModule;
|
||||
u_int8_t priority;
|
||||
u_int8_t receiveMode;
|
||||
u_int8_t txRetry;
|
||||
};
|
||||
|
||||
struct arl_req {
|
||||
u_int32_t what_set;
|
||||
struct arl_cfg_param cfg;
|
||||
};
|
||||
|
||||
#ifdef ARLCACHE
|
||||
#define MAXARLCACHE 16
|
||||
#define ARLCACHE_RX 0
|
||||
#define ARLCACHE_TX 1
|
||||
|
||||
struct arl_sigcache {
|
||||
u_int8_t macsrc[6]; /* unique MAC address for entry */
|
||||
u_int8_t level[2];
|
||||
u_int8_t quality[2];
|
||||
};
|
||||
#endif
|
||||
|
||||
#define ARLAN_SET_name 0x0001
|
||||
#define ARLAN_SET_sid 0x0002
|
||||
#define ARLAN_SET_channelSet 0x0004
|
||||
#define ARLAN_SET_channelNumber 0x0008
|
||||
#define ARLAN_SET_spreadingCode 0x0010
|
||||
#define ARLAN_SET_registrationMode 0x0020
|
||||
#define ARLAN_SET_lanCardNodeId 0x0040
|
||||
#define ARLAN_SET_specifiedRouter 0x0080
|
||||
#define ARLAN_SET_priority 0x0100
|
||||
#define ARLAN_SET_receiveMode 0x0200
|
||||
#define ARLAN_SET_txRetry 0x0400
|
||||
|
||||
#ifdef _KERNEL
|
||||
struct arl_softc {
|
||||
struct arpcom arpcom; /* Ethernet common */
|
||||
|
||||
int arl_unit;
|
||||
struct arl_private * arl_mem; /* arlan data */
|
||||
|
||||
struct arl_cfg_param arl_cfg; /* arlan vars in our mem */
|
||||
u_char arl_control;
|
||||
|
||||
int mem_rid; /* resource id for mem */
|
||||
struct resource* mem_res; /* resource for mem */
|
||||
int irq_rid; /* resource id for irq */
|
||||
struct resource* irq_res; /* resource for irq */
|
||||
void* irq_handle; /* handle for irq handler */
|
||||
|
||||
u_char arl_tx[2048];
|
||||
int tx_len;
|
||||
u_char arl_rx[2048];
|
||||
int rx_len;
|
||||
|
||||
#ifdef ARLCACHE
|
||||
struct arl_sigcache arl_sigcache[MAXARLCACHE];
|
||||
#endif
|
||||
struct ifmedia arl_ifmedia;
|
||||
};
|
||||
#endif
|
||||
|
||||
#define ARLAN_SIGN "TELESYSTEM"
|
||||
#define ARLAN_HEADER_SIZE 0x0C
|
||||
|
||||
#define ar sc->arl_mem
|
||||
#define arcfg sc->arl_cfg
|
||||
|
||||
#define ARDELAY 10000
|
||||
#define ARDELAY1 50000
|
||||
|
||||
#define WAIT_RESET(cnt, delay) \
|
||||
do { \
|
||||
int i; \
|
||||
for (i = cnt; i && ar->resetFlag; i--) { \
|
||||
DELAY(delay); \
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
#ifdef _KERNEL
|
||||
void arl_release_resources (device_t);
|
||||
int arl_alloc_memory (device_t, int, int);
|
||||
int arl_alloc_irq (device_t, int, int);
|
||||
int arl_attach (device_t);
|
||||
int arl_wait_reset (struct arl_softc *, int, int);
|
||||
void arl_stop (struct arl_softc *);
|
||||
|
||||
driver_intr_t arl_intr;
|
||||
#endif
|
||||
|
||||
#endif /* _IF_ARLREG_H */
|
||||
@@ -96,6 +96,7 @@
|
||||
|
||||
#include <vm/vm.h> /* for vtophys */
|
||||
#include <vm/pmap.h> /* for vtophys */
|
||||
#include <machine/atomic.h> /* for atomic_readandclear_32 */
|
||||
#include <machine/clock.h> /* for DELAY */
|
||||
#include <machine/bus_memio.h>
|
||||
#include <machine/bus.h>
|
||||
@@ -2232,11 +2233,14 @@ bge_intr(xsc)
|
||||
{
|
||||
struct bge_softc *sc;
|
||||
struct ifnet *ifp;
|
||||
u_int32_t statusword;
|
||||
u_int32_t status;
|
||||
|
||||
|
||||
sc = xsc;
|
||||
ifp = &sc->arpcom.ac_if;
|
||||
statusword =
|
||||
atomic_readandclear_32(&sc->bge_rdata->bge_status_block.bge_status);
|
||||
|
||||
#ifdef notdef
|
||||
/* Avoid this for now -- checking this register is expensive. */
|
||||
@@ -2273,13 +2277,7 @@ bge_intr(xsc)
|
||||
BRGPHY_INTRS);
|
||||
}
|
||||
} else {
|
||||
if ((sc->bge_rdata->bge_status_block.bge_status &
|
||||
BGE_STATFLAG_UPDATED) &&
|
||||
(sc->bge_rdata->bge_status_block.bge_status &
|
||||
BGE_STATFLAG_LINKSTATE_CHANGED)) {
|
||||
sc->bge_rdata->bge_status_block.bge_status &=
|
||||
~(BGE_STATFLAG_UPDATED|
|
||||
BGE_STATFLAG_LINKSTATE_CHANGED);
|
||||
if (statusword & BGE_STATFLAG_LINKSTATE_CHANGED) {
|
||||
/*
|
||||
* Sometimes PCS encoding errors are detected in
|
||||
* TBI mode (on fiber NICs), and for some reason
|
||||
|
||||
+12
-7
@@ -107,6 +107,11 @@ __FBSDID("$FreeBSD$");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* If we don't have Cronyx's sppp version, we don't have fr support via sppp */
|
||||
#ifndef PP_FR
|
||||
#define PP_FR 0
|
||||
#endif
|
||||
|
||||
#define CT_DEBUG(d,s) ({if (d->chan->debug) {\
|
||||
printf ("%s: ", d->name); printf s;}})
|
||||
#define CT_DEBUG2(d,s) ({if (d->chan->debug>1) {\
|
||||
@@ -1333,7 +1338,7 @@ static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
|
||||
|
||||
#ifndef NETGRAPH
|
||||
case SERIAL_GETPROTO:
|
||||
strcpy ((char*)data, /*(d->pp.pp_flags & PP_FR) ? "fr" :*/
|
||||
strcpy ((char*)data, (d->pp.pp_flags & PP_FR) ? "fr" :
|
||||
(d->pp.pp_if.if_flags & PP_CISCO) ? "cisco" : "ppp");
|
||||
return 0;
|
||||
|
||||
@@ -1351,21 +1356,21 @@ static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
|
||||
if (d->pp.pp_if.if_flags & IFF_RUNNING)
|
||||
return EBUSY;
|
||||
if (! strcmp ("cisco", (char*)data)) {
|
||||
/* d->pp.pp_flags &= ~(PP_FR);*/
|
||||
d->pp.pp_flags &= ~(PP_FR);
|
||||
d->pp.pp_flags |= PP_KEEPALIVE;
|
||||
d->pp.pp_if.if_flags |= PP_CISCO;
|
||||
/* } else if (! strcmp ("fr", (char*)data)) {
|
||||
} else if (! strcmp ("fr", (char*)data)) {
|
||||
d->pp.pp_if.if_flags &= ~(PP_CISCO);
|
||||
d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;*/
|
||||
d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;
|
||||
} else if (! strcmp ("ppp", (char*)data)) {
|
||||
d->pp.pp_flags &= ~(/*PP_FR | */PP_KEEPALIVE);
|
||||
d->pp.pp_flags &= ~(PP_FR | PP_KEEPALIVE);
|
||||
d->pp.pp_if.if_flags &= ~(PP_CISCO);
|
||||
} else
|
||||
return EINVAL;
|
||||
return 0;
|
||||
|
||||
case SERIAL_GETKEEPALIVE:
|
||||
if (/*(d->pp.pp_flags & PP_FR) ||*/
|
||||
if ((d->pp.pp_flags & PP_FR) ||
|
||||
(d->pp.pp_if.if_flags & PP_CISCO))
|
||||
return EINVAL;
|
||||
*(int*)data = (d->pp.pp_flags & PP_KEEPALIVE) ? 1 : 0;
|
||||
@@ -1382,7 +1387,7 @@ static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
|
||||
#endif /* __FreeBSD_version >= 500000 */
|
||||
if (error)
|
||||
return error;
|
||||
if (/*(d->pp.pp_flags & PP_FR) ||*/
|
||||
if ((d->pp.pp_flags & PP_FR) ||
|
||||
(d->pp.pp_if.if_flags & PP_CISCO))
|
||||
return EINVAL;
|
||||
if (*(int*)data)
|
||||
|
||||
+13
-12
@@ -110,6 +110,11 @@ __FBSDID("$FreeBSD$");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* If we don't have Cronyx's sppp version, we don't have fr support via sppp */
|
||||
#ifndef PP_FR
|
||||
#define PP_FR 0
|
||||
#endif
|
||||
|
||||
#define CX_DEBUG(d,s) ({if (d->chan->debug) {\
|
||||
printf ("%s: ", d->name); printf s;}})
|
||||
#define CX_DEBUG2(d,s) ({if (d->chan->debug>1) {\
|
||||
@@ -226,7 +231,6 @@ static void disc_optim(struct tty *tp, struct termios *t);
|
||||
static swihand_t cx_softintr;
|
||||
#else
|
||||
static void cx_softintr (void *);
|
||||
static void *cx_slow_ih;
|
||||
static void *cx_fast_ih;
|
||||
#endif
|
||||
static void cx_down (drv_t *d);
|
||||
@@ -1810,7 +1814,7 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
|
||||
CX_DEBUG2 (d, ("ioctl: getproto\n"));
|
||||
s = splhigh ();
|
||||
strcpy ((char*)data, (c->mode == M_ASYNC) ? "async" :
|
||||
/*(d->pp.pp_flags & PP_FR) ? "fr" :*/
|
||||
(d->pp.pp_flags & PP_FR) ? "fr" :
|
||||
(d->pp.pp_if.if_flags & PP_CISCO) ? "cisco" : "ppp");
|
||||
splx (s);
|
||||
return 0;
|
||||
@@ -1832,14 +1836,14 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
|
||||
if (d->pp.pp_if.if_flags & IFF_RUNNING)
|
||||
return EBUSY;
|
||||
if (! strcmp ("cisco", (char*)data)) {
|
||||
/* d->pp.pp_flags &= ~(PP_FR);*/
|
||||
d->pp.pp_flags &= ~(PP_FR);
|
||||
d->pp.pp_flags |= PP_KEEPALIVE;
|
||||
d->pp.pp_if.if_flags |= PP_CISCO;
|
||||
/* } else if (! strcmp ("fr", (char*)data)) {*/
|
||||
/* d->pp.pp_if.if_flags &= ~(PP_CISCO);*/
|
||||
/* d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;*/
|
||||
} else if (! strcmp ("fr", (char*)data)) {
|
||||
d->pp.pp_if.if_flags &= ~(PP_CISCO);
|
||||
d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;
|
||||
} else if (! strcmp ("ppp", (char*)data)) {
|
||||
d->pp.pp_flags &= ~(/*PP_FR |*/ PP_KEEPALIVE);
|
||||
d->pp.pp_flags &= ~(PP_FR | PP_KEEPALIVE);
|
||||
d->pp.pp_if.if_flags &= ~(PP_CISCO);
|
||||
} else
|
||||
return EINVAL;
|
||||
@@ -1847,7 +1851,7 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
|
||||
|
||||
case SERIAL_GETKEEPALIVE:
|
||||
CX_DEBUG2 (d, ("ioctl: getkeepalive\n"));
|
||||
if (/*(d->pp.pp_flags & PP_FR) ||*/
|
||||
if ((d->pp.pp_flags & PP_FR) ||
|
||||
(d->pp.pp_if.if_flags & PP_CISCO) ||
|
||||
(c->mode == M_ASYNC))
|
||||
return EINVAL;
|
||||
@@ -1868,7 +1872,7 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
|
||||
#endif /* __FreeBSD_version >= 500000 */
|
||||
if (error)
|
||||
return error;
|
||||
if (/*(d->pp.pp_flags & PP_FR) ||*/
|
||||
if ((d->pp.pp_flags & PP_FR) ||
|
||||
(d->pp.pp_if.if_flags & PP_CISCO))
|
||||
return EINVAL;
|
||||
s = splhigh ();
|
||||
@@ -3145,8 +3149,6 @@ static int cx_modevent (module_t mod, int type, void *unused)
|
||||
#else
|
||||
swi_add(&tty_ithd, "tty:cx", cx_softintr, NULL, SWI_TTY, 0,
|
||||
&cx_fast_ih);
|
||||
swi_add(&clk_ithd, "tty:cx", cx_softintr, NULL, SWI_TTY, 0,
|
||||
&cx_slow_ih);
|
||||
#endif
|
||||
break;
|
||||
case MOD_UNLOAD:
|
||||
@@ -3163,7 +3165,6 @@ static int cx_modevent (module_t mod, int type, void *unused)
|
||||
untimeout (cx_timeout, 0, timeout_handle);
|
||||
#if __FreeBSD_version >= 500000
|
||||
ithread_remove_handler (cx_fast_ih);
|
||||
ithread_remove_handler (cx_slow_ih);
|
||||
#else
|
||||
unregister_swi (SWI_TTY, cx_softintr);
|
||||
#endif
|
||||
|
||||
@@ -1,170 +0,0 @@
|
||||
/*-
|
||||
* Written by: David Jeffery
|
||||
* Copyright (c) 2002 Adaptec Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/ips/ips.h>
|
||||
#include <dev/ips/ips_disk.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static int ipsd_probe(device_t dev);
|
||||
static int ipsd_attach(device_t dev);
|
||||
static int ipsd_detach(device_t dev);
|
||||
|
||||
static disk_open_t ipsd_open;
|
||||
static disk_close_t ipsd_close;
|
||||
static disk_strategy_t ipsd_strategy;
|
||||
|
||||
static device_method_t ipsd_methods[] = {
|
||||
DEVMETHOD(device_probe, ipsd_probe),
|
||||
DEVMETHOD(device_attach, ipsd_attach),
|
||||
DEVMETHOD(device_detach, ipsd_detach),
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
static driver_t ipsd_driver = {
|
||||
"ipsd",
|
||||
ipsd_methods,
|
||||
sizeof(ipsdisk_softc_t)
|
||||
};
|
||||
|
||||
static devclass_t ipsd_devclass;
|
||||
DRIVER_MODULE(ipsd, ips, ipsd_driver, ipsd_devclass, 0, 0);
|
||||
|
||||
/* handle opening of disk device. It must set up all
|
||||
information about the geometry and size of the disk */
|
||||
static int ipsd_open(struct disk *dp)
|
||||
{
|
||||
ipsdisk_softc_t *dsc = dp->d_drv1;
|
||||
|
||||
dsc->state |= IPS_DEV_OPEN;
|
||||
DEVICE_PRINTF(2, dsc->dev, "I'm open\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ipsd_close(struct disk *dp)
|
||||
{
|
||||
ipsdisk_softc_t *dsc = dp->d_drv1;
|
||||
dsc->state &= ~IPS_DEV_OPEN;
|
||||
DEVICE_PRINTF(2, dsc->dev, "I'm closed for the day\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ipsd_finish is called to clean up and return a completed IO request */
|
||||
void ipsd_finish(struct bio *iobuf)
|
||||
{
|
||||
ipsdisk_softc_t *dsc;
|
||||
dsc = iobuf->bio_disk->d_drv1;
|
||||
|
||||
if (iobuf->bio_flags & BIO_ERROR) {
|
||||
ipsdisk_softc_t *dsc;
|
||||
dsc = iobuf->bio_disk->d_drv1;
|
||||
device_printf(dsc->dev, "iobuf error %d\n", iobuf->bio_error);
|
||||
} else
|
||||
iobuf->bio_resid = 0;
|
||||
|
||||
biodone(iobuf);
|
||||
ips_start_io_request(dsc->sc);
|
||||
}
|
||||
|
||||
|
||||
static void ipsd_strategy(struct bio *iobuf)
|
||||
{
|
||||
ipsdisk_softc_t *dsc;
|
||||
|
||||
dsc = iobuf->bio_disk->d_drv1;
|
||||
DEVICE_PRINTF(8,dsc->dev,"in strategy\n");
|
||||
iobuf->bio_driver1 = (void *)(uintptr_t)dsc->sc->drives[dsc->disk_number].drivenum;
|
||||
mtx_lock(&dsc->sc->queue_mtx);
|
||||
bioq_disksort(&dsc->sc->queue, iobuf);
|
||||
mtx_unlock(&dsc->sc->queue_mtx);
|
||||
ips_start_io_request(dsc->sc);
|
||||
}
|
||||
|
||||
static int ipsd_probe(device_t dev)
|
||||
{
|
||||
DEVICE_PRINTF(2,dev, "in probe\n");
|
||||
device_set_desc(dev, "Logical Drive");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ipsd_attach(device_t dev)
|
||||
{
|
||||
device_t adapter;
|
||||
ipsdisk_softc_t *dsc;
|
||||
u_int totalsectors;
|
||||
|
||||
DEVICE_PRINTF(2,dev, "in attach\n");
|
||||
|
||||
dsc = (ipsdisk_softc_t *)device_get_softc(dev);
|
||||
bzero(dsc, sizeof(ipsdisk_softc_t));
|
||||
adapter = device_get_parent(dev);
|
||||
dsc->dev = dev;
|
||||
dsc->sc = device_get_softc(adapter);
|
||||
dsc->unit = device_get_unit(dev);
|
||||
dsc->disk_number = (uintptr_t) device_get_ivars(dev);
|
||||
dsc->ipsd_disk = disk_alloc();
|
||||
dsc->ipsd_disk->d_drv1 = dsc;
|
||||
dsc->ipsd_disk->d_name = "ipsd";
|
||||
dsc->ipsd_disk->d_maxsize = IPS_MAX_IO_SIZE;
|
||||
dsc->ipsd_disk->d_open = ipsd_open;
|
||||
dsc->ipsd_disk->d_close = ipsd_close;
|
||||
dsc->ipsd_disk->d_strategy = ipsd_strategy;
|
||||
|
||||
totalsectors = dsc->sc->drives[dsc->disk_number].sector_count;
|
||||
if ((totalsectors > 0x400000) &&
|
||||
((dsc->sc->adapter_info.miscflags & 0x8) == 0)) {
|
||||
dsc->ipsd_disk->d_fwheads = IPS_NORM_HEADS;
|
||||
dsc->ipsd_disk->d_fwsectors = IPS_NORM_SECTORS;
|
||||
} else {
|
||||
dsc->ipsd_disk->d_fwheads = IPS_COMP_HEADS;
|
||||
dsc->ipsd_disk->d_fwsectors = IPS_COMP_SECTORS;
|
||||
}
|
||||
dsc->ipsd_disk->d_sectorsize = IPS_BLKSIZE;
|
||||
dsc->ipsd_disk->d_mediasize = (off_t)totalsectors * IPS_BLKSIZE;
|
||||
dsc->ipsd_disk->d_unit = dsc->unit;
|
||||
dsc->ipsd_disk->d_flags = DISKFLAG_NEEDSGIANT;
|
||||
disk_create(dsc->ipsd_disk, DISK_VERSION);
|
||||
|
||||
device_printf(dev, "Logical Drive (%dMB)\n",
|
||||
dsc->sc->drives[dsc->disk_number].sector_count >> 11);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ipsd_detach(device_t dev)
|
||||
{
|
||||
ipsdisk_softc_t *dsc;
|
||||
|
||||
DEVICE_PRINTF(2, dev,"in detach\n");
|
||||
dsc = (ipsdisk_softc_t *)device_get_softc(dev);
|
||||
if(dsc->state & IPS_DEV_OPEN)
|
||||
return (EBUSY);
|
||||
disk_destroy(dsc->ipsd_disk);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 2002 Adaptec Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by: David Jeffery
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/disk.h>
|
||||
#include <sys/bio.h>
|
||||
#include <sys/disk.h>
|
||||
#include <geom/geom_disk.h>
|
||||
|
||||
#include <machine/bus_memio.h>
|
||||
#include <machine/bus.h>
|
||||
#include <sys/rman.h>
|
||||
#include <machine/resource.h>
|
||||
|
||||
#include <dev/pci/pcireg.h>
|
||||
#include <dev/pci/pcivar.h>
|
||||
|
||||
#define IPS_MAX_IO_SIZE 0x10000
|
||||
|
||||
#define IPS_COMP_HEADS 128
|
||||
#define IPS_COMP_SECTORS 32
|
||||
#define IPS_NORM_HEADS 254
|
||||
#define IPS_NORM_SECTORS 63
|
||||
|
||||
typedef struct ipsdisk_softc {
|
||||
device_t dev;
|
||||
int unit;
|
||||
int disk_number;
|
||||
u_int32_t state;
|
||||
struct disk *ipsd_disk;
|
||||
ips_softc_t *sc;
|
||||
}ipsdisk_softc_t;
|
||||
@@ -1,61 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 2002 Adaptec Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by: David Jeffery
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
#define IPS_USER_CMD _IOWR(0x81,0x21,ips_user_request)
|
||||
|
||||
#define IPS_IOCTL_READ 1
|
||||
#define IPS_IOCTL_WRITE 2
|
||||
|
||||
#define IPS_REBUILD_STAT_SIZE 116
|
||||
#define IPS_SUBSYS_PARAM_SIZE 128
|
||||
#define IPS_RW_NVRAM_SIZE 128
|
||||
|
||||
#define IPS_IOCTL_BUFFER_SIZE 4096
|
||||
|
||||
|
||||
typedef struct ips_ioctl{
|
||||
ips_generic_cmd * command_buffer;
|
||||
void * data_buffer;
|
||||
ips_cmd_status_t status;
|
||||
int datasize;
|
||||
int readwrite;
|
||||
bus_dma_tag_t dmatag;
|
||||
bus_dmamap_t dmamap;
|
||||
}ips_ioctl_t;
|
||||
|
||||
typedef struct ips_user_request{
|
||||
void * command_buffer;
|
||||
void * data_buffer;
|
||||
u_int32_t status;
|
||||
}ips_user_request;
|
||||
|
||||
@@ -1,227 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 2002 Adaptec Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by: David Jeffery
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/ips/ips.h>
|
||||
|
||||
static int ips_pci_free(ips_softc_t *sc);
|
||||
static void ips_intrhook(void *arg);
|
||||
|
||||
static int ips_pci_probe(device_t dev)
|
||||
{
|
||||
|
||||
if ((pci_get_vendor(dev) == IPS_VENDOR_ID) &&
|
||||
(pci_get_device(dev) == IPS_MORPHEUS_DEVICE_ID)) {
|
||||
device_set_desc(dev, "IBM ServeRAID Adapter");
|
||||
return 0;
|
||||
} else if ((pci_get_vendor(dev) == IPS_VENDOR_ID) &&
|
||||
(pci_get_device(dev) == IPS_COPPERHEAD_DEVICE_ID)) {
|
||||
device_set_desc(dev, "IBM ServeRAID Adapter");
|
||||
return (0);
|
||||
} else if ((pci_get_vendor(dev) == IPS_VENDOR_ID_ADAPTEC) &&
|
||||
(pci_get_device(dev) == IPS_MARCO_DEVICE_ID)) {
|
||||
device_set_desc(dev, "Adaptec ServeRAID Adapter");
|
||||
return (0);
|
||||
}
|
||||
return(ENXIO);
|
||||
}
|
||||
|
||||
static int ips_pci_attach(device_t dev)
|
||||
{
|
||||
u_int32_t command;
|
||||
ips_softc_t *sc;
|
||||
|
||||
|
||||
if (resource_disabled(device_get_name(dev), device_get_unit(dev))) {
|
||||
device_printf(dev, "device is disabled\n");
|
||||
/* but return 0 so the !$)$)*!$*) unit isn't reused */
|
||||
return (0);
|
||||
}
|
||||
DEVICE_PRINTF(1, dev, "in attach.\n");
|
||||
sc = (ips_softc_t *)device_get_softc(dev);
|
||||
if(!sc){
|
||||
printf("how is sc NULL?!\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
bzero(sc, sizeof(ips_softc_t));
|
||||
sc->dev = dev;
|
||||
|
||||
if(pci_get_device(dev) == IPS_MORPHEUS_DEVICE_ID){
|
||||
sc->ips_adapter_reinit = ips_morpheus_reinit;
|
||||
sc->ips_adapter_intr = ips_morpheus_intr;
|
||||
sc->ips_issue_cmd = ips_issue_morpheus_cmd;
|
||||
} else if(pci_get_device(dev) == IPS_COPPERHEAD_DEVICE_ID){
|
||||
sc->ips_adapter_reinit = ips_copperhead_reinit;
|
||||
sc->ips_adapter_intr = ips_copperhead_intr;
|
||||
sc->ips_issue_cmd = ips_issue_copperhead_cmd;
|
||||
} else if (pci_get_device(dev) == IPS_MARCO_DEVICE_ID){
|
||||
sc->ips_adapter_reinit = ips_morpheus_reinit;
|
||||
sc->ips_adapter_intr = ips_morpheus_intr;
|
||||
sc->ips_issue_cmd = ips_issue_morpheus_cmd;
|
||||
} else
|
||||
goto error;
|
||||
/* make sure busmastering is on */
|
||||
command = pci_read_config(dev, PCIR_COMMAND, 1);
|
||||
command |= PCIM_CMD_BUSMASTEREN;
|
||||
pci_write_config(dev, PCIR_COMMAND, command, 1);
|
||||
/* seting up io space */
|
||||
sc->iores = NULL;
|
||||
if(command & PCIM_CMD_MEMEN){
|
||||
PRINTF(10, "trying MEMIO\n");
|
||||
if(pci_get_device(dev) == IPS_COPPERHEAD_DEVICE_ID)
|
||||
sc->rid = PCIR_BAR(1);
|
||||
else
|
||||
sc->rid = PCIR_BAR(0);
|
||||
sc->iotype = SYS_RES_MEMORY;
|
||||
sc->iores = bus_alloc_resource_any(dev, sc->iotype,
|
||||
&sc->rid, RF_ACTIVE);
|
||||
}
|
||||
if(!sc->iores && command & PCIM_CMD_PORTEN){
|
||||
PRINTF(10, "trying PORTIO\n");
|
||||
sc->rid = PCIR_BAR(0);
|
||||
sc->iotype = SYS_RES_IOPORT;
|
||||
sc->iores = bus_alloc_resource_any(dev, sc->iotype,
|
||||
&sc->rid, RF_ACTIVE);
|
||||
}
|
||||
if(sc->iores == NULL){
|
||||
device_printf(dev, "resource allocation failed\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
sc->bustag = rman_get_bustag(sc->iores);
|
||||
sc->bushandle = rman_get_bushandle(sc->iores);
|
||||
/*allocate an interrupt. when does the irq become active? after leaving attach? */
|
||||
sc->irqrid = 0;
|
||||
if(!(sc->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ,
|
||||
&sc->irqrid, RF_SHAREABLE | RF_ACTIVE))){
|
||||
device_printf(dev, "irq allocation failed\n");
|
||||
goto error;
|
||||
}
|
||||
if(bus_setup_intr(dev, sc->irqres, INTR_TYPE_BIO, sc->ips_adapter_intr, sc, &sc->irqcookie)){
|
||||
device_printf(dev, "irq setup failed\n");
|
||||
goto error;
|
||||
}
|
||||
if (bus_dma_tag_create( /* parent */ NULL,
|
||||
/* alignemnt */ 1,
|
||||
/* boundary */ 0,
|
||||
/* lowaddr */ BUS_SPACE_MAXADDR_32BIT,
|
||||
/* highaddr */ BUS_SPACE_MAXADDR,
|
||||
/* filter */ NULL,
|
||||
/* filterarg */ NULL,
|
||||
/* maxsize */ BUS_SPACE_MAXSIZE_32BIT,
|
||||
/* numsegs */ IPS_MAX_SG_ELEMENTS,
|
||||
/* maxsegsize*/ BUS_SPACE_MAXSIZE_32BIT,
|
||||
/* flags */ 0,
|
||||
/* lockfunc */ busdma_lock_mutex,
|
||||
/* lockarg */ &Giant,
|
||||
&sc->adapter_dmatag) != 0) {
|
||||
printf("IPS can't alloc dma tag\n");
|
||||
goto error;
|
||||
}
|
||||
sc->ips_ich.ich_func = ips_intrhook;
|
||||
sc->ips_ich.ich_arg = sc;
|
||||
mtx_init(&sc->queue_mtx, "IPS bioqueue lock", MTX_DEF, 0);
|
||||
bioq_init(&sc->queue);
|
||||
if (config_intrhook_establish(&sc->ips_ich) != 0) {
|
||||
printf("IPS can't establish configuration hook\n");
|
||||
goto error;
|
||||
}
|
||||
return 0;
|
||||
error:
|
||||
ips_pci_free(sc);
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
static void
|
||||
ips_intrhook(void *arg)
|
||||
{
|
||||
struct ips_softc *sc = (struct ips_softc *)arg;
|
||||
|
||||
config_intrhook_disestablish(&sc->ips_ich);
|
||||
if (ips_adapter_init(sc))
|
||||
ips_pci_free(sc);
|
||||
else
|
||||
sc->configured = 1;
|
||||
}
|
||||
|
||||
static int ips_pci_free(ips_softc_t *sc)
|
||||
{
|
||||
if(sc->adapter_dmatag)
|
||||
bus_dma_tag_destroy(sc->adapter_dmatag);
|
||||
if(sc->irqcookie)
|
||||
bus_teardown_intr(sc->dev, sc->irqres, sc->irqcookie);
|
||||
if(sc->irqres)
|
||||
bus_release_resource(sc->dev, SYS_RES_IRQ, sc->irqrid, sc->irqres);
|
||||
if(sc->iores)
|
||||
bus_release_resource(sc->dev, sc->iotype, sc->rid, sc->iores);
|
||||
sc->configured = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ips_pci_detach(device_t dev)
|
||||
{
|
||||
ips_softc_t *sc;
|
||||
DEVICE_PRINTF(1, dev, "detaching ServeRaid\n");
|
||||
sc = (ips_softc_t *) device_get_softc(dev);
|
||||
if (sc->configured) {
|
||||
sc->configured = 0;
|
||||
ips_flush_cache(sc);
|
||||
if(ips_adapter_free(sc))
|
||||
return EBUSY;
|
||||
ips_pci_free(sc);
|
||||
bioq_flush(&sc->queue, NULL, ENXIO);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ips_pci_shutdown(device_t dev)
|
||||
{
|
||||
ips_softc_t *sc = (ips_softc_t *) device_get_softc(dev);
|
||||
if (sc->configured) {
|
||||
ips_flush_cache(sc);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static device_method_t ips_driver_methods[] = {
|
||||
DEVMETHOD(device_probe, ips_pci_probe),
|
||||
DEVMETHOD(device_attach, ips_pci_attach),
|
||||
DEVMETHOD(device_detach, ips_pci_detach),
|
||||
DEVMETHOD(device_shutdown, ips_pci_shutdown),
|
||||
{0,0}
|
||||
};
|
||||
|
||||
static driver_t ips_pci_driver = {
|
||||
"ips",
|
||||
ips_driver_methods,
|
||||
sizeof(ips_softc_t),
|
||||
};
|
||||
|
||||
static devclass_t ips_devclass;
|
||||
DRIVER_MODULE(ips, pci, ips_pci_driver, ips_devclass, 0, 0);
|
||||
+8
-8
@@ -393,14 +393,14 @@ twe_startio(struct twe_softc *sc)
|
||||
|
||||
/* build a command from an outstanding bio */
|
||||
if (tr == NULL) {
|
||||
|
||||
/* see if there's work to be done */
|
||||
if ((bp = twe_dequeue_bio(sc)) == NULL)
|
||||
break;
|
||||
|
||||
/* get a command to handle the bio with */
|
||||
if (twe_get_request(sc, &tr)) {
|
||||
twe_enqueue_bio(sc, bp); /* failed, put the bio back */
|
||||
if (twe_get_request(sc, &tr))
|
||||
break;
|
||||
|
||||
/* see if there's work to be done */
|
||||
if ((bp = twe_dequeue_bio(sc)) == NULL) {
|
||||
twe_release_request(tr);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1053,10 +1053,10 @@ twe_start(struct twe_request *tr)
|
||||
twe_check_bits(sc, status_reg);
|
||||
|
||||
if (!(status_reg & TWE_STATUS_COMMAND_QUEUE_FULL)) {
|
||||
TWE_COMMAND_QUEUE(sc, tr->tr_cmdphys);
|
||||
done = 1;
|
||||
/* move command to work queue */
|
||||
twe_enqueue_busy(tr);
|
||||
TWE_COMMAND_QUEUE(sc, tr->tr_cmdphys);
|
||||
done = 1;
|
||||
#ifdef TWE_DEBUG
|
||||
if (tr->tr_complete != NULL) {
|
||||
debug(3, "queued request %d with callback %p", tr->tr_command.generic.request_id, tr->tr_complete);
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
/* PCI related defines */
|
||||
#define TWE_IO_CONFIG_REG 0x10
|
||||
#define TWE_DEVICE_NAME "3ware 7000 series Storage Controller"
|
||||
#define TWE_DEVICE_NAME "3ware Storage Controller"
|
||||
#define TWE_VENDOR_ID 0x13C1
|
||||
#define TWE_DEVICE_ID 0x1000
|
||||
#define TWE_DEVICE_ID_ASIC 0x1001
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*
|
||||
* The scheme for the driver version is:
|
||||
* <major change>.<external release>.<3ware internal release>.<development release>
|
||||
*/
|
||||
#define TWE_DRIVER_VERSION_STRING "1.40.01.000"
|
||||
#define TWE_DRIVER_VERSION_STRING "1.40.01.001"
|
||||
#define TWE_CDEV_MAJOR 146
|
||||
#define TWED_CDEV_MAJOR 147
|
||||
|
||||
|
||||
@@ -704,11 +704,19 @@ umass_match_proto(struct umass_softc *sc, usbd_interface_handle iface,
|
||||
UGETW(dd->idProduct) == USB_PRODUCT_IODATA_IU_CD2) {
|
||||
sc->proto = UMASS_PROTO_SCSI | UMASS_PROTO_BBB;
|
||||
}
|
||||
if (UGETW(dd->idVendor) == USB_VENDOR_IODATA &&
|
||||
UGETW(dd->idProduct) == USB_PRODUCT_IODATA_DVR_UEH8) {
|
||||
sc->proto = UMASS_PROTO_SCSI | UMASS_PROTO_BBB;
|
||||
}
|
||||
/* Logitec DVD multi plus unit */
|
||||
if (UGETW(dd->idVendor) == USB_VENDOR_LOGITEC &&
|
||||
UGETW(dd->idProduct) == USB_PRODUCT_LOGITEC_LDR_H443U2) {
|
||||
sc->proto = UMASS_PROTO_SCSI;
|
||||
}
|
||||
if (UGETW(dd->idVendor) == USB_VENDOR_LOGITEC &&
|
||||
UGETW(dd->idProduct) == USB_PRODUCT_LOGITEC_LDR_H443SU2) {
|
||||
sc->proto = UMASS_PROTO_SCSI;
|
||||
}
|
||||
if (UGETW(dd->idVendor) == USB_VENDOR_MELCO &&
|
||||
UGETW(dd->idProduct) == USB_PRODUCT_MELCO_DUBPXXG) {
|
||||
sc->quirks |= FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE;
|
||||
|
||||
@@ -1036,6 +1036,7 @@ product PALM TUNGSTEN_Z 0x0031 Palm Tungsten Z
|
||||
product PALM M125 0x0040 Palm m125
|
||||
product PALM M130 0x0050 Palm m130
|
||||
product PALM TUNGSTEN_T 0x0060 Palm Tungsten T
|
||||
product PALM ZIRE31 0x0061 Palm Zire 31
|
||||
product PALM ZIRE 0x0070 Palm Zire
|
||||
|
||||
/* Panasonic products */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
*
|
||||
* generated from:
|
||||
* FreeBSD: src/sys/dev/usb/usbdevs,v 1.11.2.55 2004/04/04 19:16:31 joe Exp
|
||||
* FreeBSD: src/sys/dev/usb/usbdevs,v 1.11.2.56.2.1 2004/05/06 18:14:50 joe Exp
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -1043,6 +1043,7 @@
|
||||
#define USB_PRODUCT_PALM_M125 0x0040 /* Palm m125 */
|
||||
#define USB_PRODUCT_PALM_M130 0x0050 /* Palm m130 */
|
||||
#define USB_PRODUCT_PALM_TUNGSTEN_T 0x0060 /* Palm Tungsten T */
|
||||
#define USB_PRODUCT_PALM_ZIRE31 0x0061 /* Palm Zire 31 */
|
||||
#define USB_PRODUCT_PALM_ZIRE 0x0070 /* Palm Zire */
|
||||
|
||||
/* Panasonic products */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
*
|
||||
* generated from:
|
||||
* FreeBSD: src/sys/dev/usb/usbdevs,v 1.11.2.55 2004/04/04 19:16:31 joe Exp
|
||||
* FreeBSD: src/sys/dev/usb/usbdevs,v 1.11.2.56.2.1 2004/05/06 18:14:50 joe Exp
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -2433,6 +2433,12 @@ const struct usb_knowndev usb_knowndevs[] = {
|
||||
"Palm Computing",
|
||||
"Palm Tungsten T",
|
||||
},
|
||||
{
|
||||
USB_VENDOR_PALM, USB_PRODUCT_PALM_ZIRE31,
|
||||
0,
|
||||
"Palm Computing",
|
||||
"Palm Zire 31",
|
||||
},
|
||||
{
|
||||
USB_VENDOR_PALM, USB_PRODUCT_PALM_ZIRE,
|
||||
0,
|
||||
|
||||
@@ -220,6 +220,7 @@ static const struct uvisor_type uvisor_devs[] = {
|
||||
{{ USB_VENDOR_PALM, USB_PRODUCT_PALM_TUNGSTEN_Z }, PALM4 },
|
||||
{{ USB_VENDOR_PALM, USB_PRODUCT_PALM_TUNGSTEN_T }, PALM4 },
|
||||
{{ USB_VENDOR_PALM, USB_PRODUCT_PALM_ZIRE }, PALM4 },
|
||||
{{ USB_VENDOR_PALM, USB_PRODUCT_PALM_ZIRE31 }, PALM4 },
|
||||
{{ USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_40 }, 0 },
|
||||
{{ USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_41 }, 0 },
|
||||
{{ USB_VENDOR_SONY, USB_PRODUCT_SONY_CLIE_S360 }, PALM4 },
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#undef ATOMIC_ASM
|
||||
|
||||
/* Make atomic.h generate public functions */
|
||||
#define WANT_FUNCTIONS
|
||||
#define static
|
||||
#undef __inline
|
||||
#define __inline
|
||||
|
||||
@@ -2174,9 +2174,10 @@ pmap_kenter_temporary(vm_paddr_t pa, int i)
|
||||
* faults on process startup and immediately after an mmap.
|
||||
*/
|
||||
void
|
||||
pmap_object_init_pt(pmap, addr, object, pindex, size, limit)
|
||||
pmap_object_init_pt(pmap, addr, prot, object, pindex, size, limit)
|
||||
pmap_t pmap;
|
||||
vm_offset_t addr;
|
||||
vm_prot_t prot;
|
||||
vm_object_t object;
|
||||
vm_pindex_t pindex;
|
||||
vm_size_t size;
|
||||
@@ -2187,7 +2188,7 @@ pmap_object_init_pt(pmap, addr, object, pindex, size, limit)
|
||||
vm_page_t p, mpte;
|
||||
int objpgs;
|
||||
|
||||
if (pmap == NULL || object == NULL)
|
||||
if ((prot & VM_PROT_READ) == 0 || pmap == NULL || object == NULL)
|
||||
return;
|
||||
|
||||
/*
|
||||
|
||||
@@ -46,11 +46,13 @@
|
||||
* atomic_clear_int(P, V) (*(u_int*)(P) &= ~(V))
|
||||
* atomic_add_int(P, V) (*(u_int*)(P) += (V))
|
||||
* atomic_subtract_int(P, V) (*(u_int*)(P) -= (V))
|
||||
* atomic_readandclear_int(P) (return *(u_int*)P; *(u_int*)P = 0;)
|
||||
*
|
||||
* atomic_set_long(P, V) (*(u_long*)(P) |= (V))
|
||||
* atomic_clear_long(P, V) (*(u_long*)(P) &= ~(V))
|
||||
* atomic_add_long(P, V) (*(u_long*)(P) += (V))
|
||||
* atomic_subtract_long(P, V) (*(u_long*)(P) -= (V))
|
||||
* atomic_readandclear_long(P) (return *(u_long*)P; *(u_long*)P = 0;)
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -148,4 +150,38 @@ ATOMIC_ASM(subtract, long, "subl %1,%0", v)
|
||||
|
||||
#endif
|
||||
|
||||
#define atomic_readandclear_32 atomic_readandclear_int
|
||||
|
||||
#ifndef WANT_FUNCTIONS
|
||||
static __inline u_int
|
||||
atomic_readandclear_int(volatile u_int *addr)
|
||||
{
|
||||
u_int result;
|
||||
|
||||
__asm __volatile (
|
||||
" xorl %0,%0 ; "
|
||||
" xchgl %1,%0 ; "
|
||||
"# atomic_readandclear_int"
|
||||
: "=&r" (result) /* 0 (result) */
|
||||
: "m" (*addr)); /* 1 (addr) */
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static __inline u_long
|
||||
atomic_readandclear_long(volatile u_long *addr)
|
||||
{
|
||||
u_long result;
|
||||
|
||||
__asm __volatile (
|
||||
" xorl %0,%0 ; "
|
||||
" xchgl %1,%0 ; "
|
||||
"# atomic_readandclear_int"
|
||||
: "=&r" (result) /* 0 (result) */
|
||||
: "m" (*addr)); /* 1 (addr) */
|
||||
|
||||
return (result);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ! _MACHINE_ATOMIC_H_ */
|
||||
@@ -224,7 +224,7 @@ sonewconn3(head, connstatus, p)
|
||||
}
|
||||
if (connstatus) {
|
||||
sorwakeup(head);
|
||||
wakeup((caddr_t)&head->so_timeo);
|
||||
wakeup_one(&head->so_timeo);
|
||||
so->so_state |= connstatus;
|
||||
}
|
||||
return (so);
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# $RISS: if_arl/modules/if_arl/Makefile,v 1.3 2003/01/13 08:05:29 frol Exp $
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${.CURDIR}/../../dev/arl
|
||||
|
||||
KMOD= if_arl
|
||||
SRCS= if_arl.c if_arl_isa.c
|
||||
SRCS+= opt_inet.h device_if.h bus_if.h isa_if.h
|
||||
CFLAGS= -I${.CURDIR}/../..
|
||||
|
||||
opt_inet.h:
|
||||
echo "#define INET 1" > opt_inet.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
@@ -1,8 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${.CURDIR}/../../dev/ips
|
||||
KMOD = ips
|
||||
SRCS = ips.c ips_pci.c ips.h ips_disk.c ips_disk.h ips_commands.c \
|
||||
ips_ioctl.h ips_ioctl.c device_if.h bus_if.h pci_if.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
@@ -1,6 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
KMOD= ng_hub
|
||||
SRCS= ng_hub.c
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
+2
-1
@@ -80,7 +80,8 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax! */
|
||||
if (namelen != 2)
|
||||
return EINVAL;
|
||||
|
||||
if (name[0] <= 0 || name[0] > if_index)
|
||||
if (name[0] <= 0 || name[0] > if_index ||
|
||||
ifnet_addrs[name[0] - 1] == NULL)
|
||||
return ENOENT;
|
||||
|
||||
ifp = ifnet_addrs[name[0] - 1]->ifa_ifp;
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 2004 Ruslan Ermilov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include <netgraph/ng_message.h>
|
||||
#include <netgraph/ng_hub.h>
|
||||
#include <netgraph/netgraph.h>
|
||||
|
||||
static ng_constructor_t ng_hub_constructor;
|
||||
static ng_rcvdata_t ng_hub_rcvdata;
|
||||
static ng_disconnect_t ng_hub_disconnect;
|
||||
|
||||
static struct ng_type ng_hub_typestruct = {
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_HUB_NODE_TYPE,
|
||||
.constructor = ng_hub_constructor,
|
||||
.rcvdata = ng_hub_rcvdata,
|
||||
.disconnect = ng_hub_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(hub, &ng_hub_typestruct);
|
||||
|
||||
|
||||
static int
|
||||
ng_hub_constructor(node_p node)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
ng_hub_rcvdata(hook_p hook, item_p item)
|
||||
{
|
||||
const node_p node = NG_HOOK_NODE(hook);
|
||||
int error = 0;
|
||||
hook_p hook2;
|
||||
struct mbuf * const m = NGI_M(item), *m2;
|
||||
meta_p const meta = NGI_META(item);
|
||||
meta_p meta2;
|
||||
int nhooks;
|
||||
|
||||
if ((nhooks = NG_NODE_NUMHOOKS(node)) == 1) {
|
||||
NG_FREE_ITEM(item);
|
||||
return (0);
|
||||
}
|
||||
LIST_FOREACH(hook2, &node->nd_hooks, hk_hooks) {
|
||||
if (hook2 == hook)
|
||||
continue;
|
||||
if (--nhooks == 1)
|
||||
NG_FWD_ITEM_HOOK(error, item, hook2);
|
||||
else {
|
||||
if ((m2 = m_dup(m, M_DONTWAIT)) == NULL) {
|
||||
NG_FREE_ITEM(item);
|
||||
return (ENOBUFS);
|
||||
}
|
||||
if (meta != NULL) {
|
||||
if ((meta2 = ng_copy_meta(meta)) == NULL) {
|
||||
m_freem(m2);
|
||||
NG_FREE_ITEM(item);
|
||||
return (ENOMEM);
|
||||
}
|
||||
} else
|
||||
meta2 = NULL;
|
||||
NG_SEND_DATA(error, hook2, m2, meta2);
|
||||
if (error)
|
||||
continue; /* don't give up */
|
||||
}
|
||||
}
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
ng_hub_disconnect(hook_p hook)
|
||||
{
|
||||
|
||||
if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0 &&
|
||||
NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))
|
||||
ng_rmnode_self(NG_HOOK_NODE(hook));
|
||||
return (0);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 2004 Ruslan Ermilov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _NETGRAPH_NG_HUB_H_
|
||||
#define _NETGRAPH_NG_HUB_H_
|
||||
|
||||
/* Node type name and magic cookie. */
|
||||
#define NG_HUB_NODE_TYPE "hub"
|
||||
#define NGM_HUB_COOKIE 1082189597
|
||||
|
||||
#endif /* _NETGRAPH_NG_HUB_H_ */
|
||||
@@ -95,6 +95,9 @@ int ipport_lastauto = IPPORT_USERRESERVED; /* 5000 */
|
||||
int ipport_hifirstauto = IPPORT_HIFIRSTAUTO; /* 49152 */
|
||||
int ipport_hilastauto = IPPORT_HILASTAUTO; /* 65535 */
|
||||
|
||||
/* Shall we allocate ephemeral ports in random order? */
|
||||
int ipport_randomized = 1;
|
||||
|
||||
#define RANGECHK(var, min, max) \
|
||||
if ((var) < (min)) { (var) = (min); } \
|
||||
else if ((var) > (max)) { (var) = (max); }
|
||||
@@ -131,6 +134,8 @@ SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hifirst, CTLTYPE_INT|CTLFLAG_RW,
|
||||
&ipport_hifirstauto, 0, &sysctl_net_ipport_check, "I", "");
|
||||
SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hilast, CTLTYPE_INT|CTLFLAG_RW,
|
||||
&ipport_hilastauto, 0, &sysctl_net_ipport_check, "I", "");
|
||||
SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomized, CTLFLAG_RW,
|
||||
&ipport_randomized, 0, "");
|
||||
|
||||
/*
|
||||
* in_pcb.c: manage the Protocol Control Blocks.
|
||||
@@ -325,6 +330,9 @@ in_pcbbind(inp, nam, p)
|
||||
/*
|
||||
* counting down
|
||||
*/
|
||||
if (ipport_randomized)
|
||||
*lastport = first -
|
||||
(arc4random() % (first - last));
|
||||
count = first - last;
|
||||
|
||||
do {
|
||||
@@ -342,6 +350,9 @@ in_pcbbind(inp, nam, p)
|
||||
/*
|
||||
* counting up
|
||||
*/
|
||||
if (ipport_randomized)
|
||||
*lastport = first +
|
||||
(arc4random() % (last - first));
|
||||
count = last - first;
|
||||
|
||||
do {
|
||||
|
||||
@@ -203,8 +203,10 @@ tcp_usr_bind(struct socket *so, struct sockaddr *nam, struct proc *p)
|
||||
* to them.
|
||||
*/
|
||||
sinp = (struct sockaddr_in *)nam;
|
||||
if (nam->sa_len != sizeof (*sinp))
|
||||
return (EINVAL);
|
||||
if (nam->sa_len != sizeof (*sinp)) {
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
if (sinp->sin_family == AF_INET &&
|
||||
IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) {
|
||||
error = EAFNOSUPPORT;
|
||||
@@ -234,8 +236,10 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, struct proc *p)
|
||||
* to them.
|
||||
*/
|
||||
sin6p = (struct sockaddr_in6 *)nam;
|
||||
if (nam->sa_len != sizeof (*sin6p))
|
||||
return (EINVAL);
|
||||
if (nam->sa_len != sizeof (*sin6p)) {
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
if (sin6p->sin6_family == AF_INET6 &&
|
||||
IN6_IS_ADDR_MULTICAST(&sin6p->sin6_addr)) {
|
||||
error = EAFNOSUPPORT;
|
||||
@@ -326,8 +330,10 @@ tcp_usr_connect(struct socket *so, struct sockaddr *nam, struct proc *p)
|
||||
* Must disallow TCP ``connections'' to multicast addresses.
|
||||
*/
|
||||
sinp = (struct sockaddr_in *)nam;
|
||||
if (nam->sa_len != sizeof (*sinp))
|
||||
return (EINVAL);
|
||||
if (nam->sa_len != sizeof (*sinp)) {
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
if (sinp->sin_family == AF_INET
|
||||
&& IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) {
|
||||
error = EAFNOSUPPORT;
|
||||
@@ -358,8 +364,10 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct proc *p)
|
||||
* Must disallow TCP ``connections'' to multicast addresses.
|
||||
*/
|
||||
sin6p = (struct sockaddr_in6 *)nam;
|
||||
if (nam->sa_len != sizeof (*sin6p))
|
||||
return (EINVAL);
|
||||
if (nam->sa_len != sizeof (*sin6p)) {
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
if (sin6p->sin6_family == AF_INET6
|
||||
&& IN6_IS_ADDR_MULTICAST(&sin6p->sin6_addr)) {
|
||||
error = EAFNOSUPPORT;
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 1992-2003 The FreeBSD Project. All rights reserved.
|
||||
* Copyright (C) 1992-2004 The FreeBSD Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
/* FreeBSD */
|
||||
#define COPYRIGHT_FreeBSD \
|
||||
"Copyright (c) 1992-2003 The FreeBSD Project.\n"
|
||||
"Copyright (c) 1992-2004 The FreeBSD Project.\n"
|
||||
|
||||
/* Berkeley */
|
||||
#define COPYRIGHT_UCB \
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
/* a port of FreeBSD to the NEC PC98, Japan */
|
||||
#define COPYRIGHT_PC98 \
|
||||
"Copyright (c) 1994-2003 FreeBSD(98) porting team.\nCopyright (c) 1992 A.Kojima F.Ukai M.Ishii (KMC).\n"
|
||||
"Copyright (c) 1994-2004 FreeBSD(98) porting team.\nCopyright (c) 1992 A.Kojima F.Ukai M.Ishii (KMC).\n"
|
||||
|
||||
#if defined(PC98)
|
||||
char copyright[] = COPYRIGHT_FreeBSD/**/COPYRIGHT_PC98/**/COPYRIGHT_UCB;
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@
|
||||
* doc/en_US.ISO8859-1/books/porters-handbook/book.sgml
|
||||
*/
|
||||
#undef __FreeBSD_version
|
||||
#define __FreeBSD_version 490102 /* Master, propagated to newvers */
|
||||
#define __FreeBSD_version 491000 /* Master, propagated to newvers */
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
|
||||
+10
-2
@@ -238,7 +238,11 @@ ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp)
|
||||
ip->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
allocbuf(bp, nsize);
|
||||
bp->b_flags |= B_DONE;
|
||||
bzero((char *)bp->b_data + osize, (u_int)nsize - osize);
|
||||
if ((bp->b_flags & (B_MALLOC | B_VMIO)) != B_VMIO)
|
||||
bzero((char *)bp->b_data + osize,
|
||||
(u_int)nsize - osize);
|
||||
else
|
||||
vfs_bio_clrbuf(bp);
|
||||
*bpp = bp;
|
||||
return (0);
|
||||
}
|
||||
@@ -303,7 +307,11 @@ ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp)
|
||||
ip->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
allocbuf(bp, nsize);
|
||||
bp->b_flags |= B_DONE;
|
||||
bzero((char *)bp->b_data + osize, (u_int)nsize - osize);
|
||||
if ((bp->b_flags & (B_MALLOC | B_VMIO)) != B_VMIO)
|
||||
bzero((char *)bp->b_data + osize,
|
||||
(u_int)nsize - osize);
|
||||
else
|
||||
vfs_bio_clrbuf(bp);
|
||||
*bpp = bp;
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -532,6 +532,8 @@ WRITE(ap)
|
||||
bp->b_flags |= B_DIRECT;
|
||||
if (ioflag & IO_NOWDRAIN)
|
||||
bp->b_flags |= B_NOWDRAIN;
|
||||
if ((ioflag & (IO_SYNC|IO_INVAL)) == (IO_SYNC|IO_INVAL))
|
||||
bp->b_flags |= B_NOCACHE;
|
||||
|
||||
if (uio->uio_offset + xfersize > ip->i_size) {
|
||||
ip->i_size = uio->uio_offset + xfersize;
|
||||
|
||||
+2
-2
@@ -111,8 +111,8 @@ void pmap_kenter __P((vm_offset_t, vm_paddr_t));
|
||||
void pmap_kremove __P((vm_offset_t));
|
||||
vm_offset_t pmap_map __P((vm_offset_t, vm_paddr_t, vm_paddr_t, int));
|
||||
void pmap_object_init_pt __P((pmap_t pmap, vm_offset_t addr,
|
||||
vm_object_t object, vm_pindex_t pindex, vm_offset_t size,
|
||||
int pagelimit));
|
||||
vm_prot_t prot, vm_object_t object, vm_pindex_t pindex,
|
||||
vm_offset_t size, int pagelimit));
|
||||
boolean_t pmap_page_exists_quick __P((pmap_t pmap, vm_page_t m));
|
||||
void pmap_page_protect __P((vm_page_t m, vm_prot_t prot));
|
||||
void pmap_pageable __P((pmap_t, vm_offset_t, vm_offset_t,
|
||||
|
||||
+12
-4
@@ -76,6 +76,8 @@
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/resourcevar.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
@@ -149,6 +151,10 @@ static void vm_map_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t,
|
||||
static void vm_map_split __P((vm_map_entry_t));
|
||||
static void vm_map_unclip_range __P((vm_map_t map, vm_map_entry_t start_entry, vm_offset_t start, vm_offset_t end, int flags));
|
||||
|
||||
static int old_msync;
|
||||
SYSCTL_INT(_vm, OID_AUTO, old_msync, CTLFLAG_RW, &old_msync, 0,
|
||||
"Use old (insecure) msync behavior");
|
||||
|
||||
void
|
||||
vm_map_startup()
|
||||
{
|
||||
@@ -643,7 +649,7 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
|
||||
#endif
|
||||
|
||||
if (cow & (MAP_PREFAULT|MAP_PREFAULT_PARTIAL)) {
|
||||
pmap_object_init_pt(map->pmap, start,
|
||||
pmap_object_init_pt(map->pmap, start, prot,
|
||||
object, OFF_TO_IDX(offset), end - start,
|
||||
cow & MAP_PREFAULT_PARTIAL);
|
||||
}
|
||||
@@ -1454,6 +1460,7 @@ vm_map_madvise(map, start, end, behav)
|
||||
pmap_object_init_pt(
|
||||
map->pmap,
|
||||
useStart,
|
||||
current->protection,
|
||||
current->object.vm_object,
|
||||
pindex,
|
||||
(count << PAGE_SHIFT),
|
||||
@@ -2013,7 +2020,7 @@ vm_map_clean(map, start, end, syncio, invalidate)
|
||||
vm_object_page_remove(object,
|
||||
OFF_TO_IDX(offset),
|
||||
OFF_TO_IDX(offset + size + PAGE_MASK),
|
||||
FALSE);
|
||||
old_msync ? FALSE : TRUE);
|
||||
vm_object_deallocate(object);
|
||||
}
|
||||
start += size;
|
||||
@@ -2777,7 +2784,8 @@ vmspace_exec(struct proc *p) {
|
||||
|
||||
newvmspace = vmspace_alloc(map->min_offset, map->max_offset);
|
||||
bcopy(&oldvmspace->vm_startcopy, &newvmspace->vm_startcopy,
|
||||
(caddr_t) (newvmspace + 1) - (caddr_t) &newvmspace->vm_startcopy);
|
||||
(caddr_t) &newvmspace->vm_endcopy -
|
||||
(caddr_t) &newvmspace->vm_startcopy);
|
||||
/*
|
||||
* This code is written like this for prototype purposes. The
|
||||
* goal is to avoid running down the vmspace here, but let the
|
||||
@@ -3253,7 +3261,7 @@ vm_uiomove(mapa, srcobject, cp, cnta, uaddra, npages)
|
||||
/*
|
||||
* Map the window directly, if it is already in memory
|
||||
*/
|
||||
pmap_object_init_pt(map->pmap, uaddr,
|
||||
pmap_object_init_pt(map->pmap, uaddr, entry->protection,
|
||||
srcobject, oindex, tcnt, 0);
|
||||
|
||||
map->timestamp++;
|
||||
|
||||
+3
-2
@@ -82,7 +82,8 @@ int connected;
|
||||
char mode[32];
|
||||
char line[200];
|
||||
int margc;
|
||||
char *margv[20];
|
||||
#define MAX_MARGV 20
|
||||
char *margv[MAX_MARGV];
|
||||
char *prompt = "tftp";
|
||||
jmp_buf toplevel;
|
||||
volatile int txrx_error;
|
||||
@@ -683,7 +684,7 @@ makeargv()
|
||||
margc = 0;
|
||||
if ((cp = strchr(line, '\n')))
|
||||
*cp = '\0';
|
||||
for (cp = line; *cp;) {
|
||||
for (cp = line; margc < MAX_MARGV - 1 && *cp;) {
|
||||
while (isspace(*cp))
|
||||
cp++;
|
||||
if (*cp == '\0')
|
||||
|
||||
@@ -1,431 +0,0 @@
|
||||
/*
|
||||
* $RISS: if_arl/arlconfig/arlconfig.c,v 1.5 2004/03/16 05:00:21 count Exp $
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/if_ether.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <dev/arl/if_arlreg.h>
|
||||
|
||||
struct freq_list {
|
||||
short fr_no;
|
||||
char* name;
|
||||
};
|
||||
|
||||
struct freq_list freq_list_1[] = {
|
||||
{ 0, "908.50" },
|
||||
{ 1, "910.06" },
|
||||
{ 2, "915.52" },
|
||||
{ 3, "915.00" },
|
||||
{ 4, "917.83" },
|
||||
{ 5, "919.22" },
|
||||
{ 6, "922.26" },
|
||||
{ 7, "911.45" },
|
||||
{ 8, "915.00" },
|
||||
{ 9, "918.55" },
|
||||
{ 10,"915.00" },
|
||||
{ 11,"915.00" }
|
||||
};
|
||||
|
||||
struct freq_list freq_list_6[] = {
|
||||
{ 0, "920.31" },
|
||||
{ 1, "920.33" },
|
||||
{ 2, "921.55" },
|
||||
{ 3, "922.17" },
|
||||
{ 4, "922.79" },
|
||||
{ 5, "921.46" },
|
||||
{ 6, "921.55" }
|
||||
};
|
||||
|
||||
struct freq_list freq_list_9[] = {
|
||||
{ 0, "Bad" },
|
||||
{ 1, "2412" },
|
||||
{ 2, "2427" },
|
||||
{ 3, "2442" },
|
||||
{ 4, "2457" },
|
||||
{ 5, "2465" }
|
||||
};
|
||||
|
||||
|
||||
struct freq_list freq_list_10[] = {
|
||||
{ 0, "Bad" },
|
||||
{ 1, "2412" },
|
||||
{ 2, "2427" },
|
||||
{ 3, "2442" },
|
||||
{ 4, "2457" },
|
||||
{ 5, "2472" }
|
||||
};
|
||||
|
||||
struct freq_list freq_list_11[] = {
|
||||
{ 0, "Bad" },
|
||||
{ 1, "2484" }
|
||||
};
|
||||
|
||||
struct freq_list freq_list_12[] = {
|
||||
{ 0, "Bad" },
|
||||
{ 1, "2457" },
|
||||
{ 2, "2465" },
|
||||
{ 3, "2472" },
|
||||
};
|
||||
|
||||
struct freq_list freq_list_13[] = {
|
||||
{ 0, "Bad" },
|
||||
{ 1, "2411" },
|
||||
{ 2, "2425" },
|
||||
{ 3, "2439" }
|
||||
};
|
||||
|
||||
struct freq_list freq_list_14[] = {
|
||||
{ 0, "Bad" },
|
||||
{ 1, "2427" },
|
||||
{ 2, "2442" },
|
||||
{ 3, "2457" }
|
||||
};
|
||||
|
||||
struct freq_list freq_list_15[] = {
|
||||
{ 0, "Bad" },
|
||||
{ 1, "2460" }
|
||||
};
|
||||
|
||||
#define MAXFREQ(a) sizeof(a)/sizeof(struct freq_list)
|
||||
|
||||
struct rate_list {
|
||||
short rate_no;
|
||||
char* name;
|
||||
};
|
||||
|
||||
struct rate_list rate_list_2400[] = {
|
||||
{ 0, "Bad" },
|
||||
{ 1, "354" },
|
||||
{ 2, "512" },
|
||||
{ 3, "1000" },
|
||||
{ 4, "2000" }
|
||||
};
|
||||
|
||||
struct radio_type {
|
||||
int id;
|
||||
char* name;
|
||||
} radio_type_list [] = {
|
||||
{ 0, "No EPROM" },
|
||||
{ 1, "092/094" },
|
||||
{ 2, "020" },
|
||||
{ 3, "092A" },
|
||||
{ 4, "020B" },
|
||||
{ 5, "095" },
|
||||
{ 6, "024" },
|
||||
{ 7, "025B" },
|
||||
{ 8, "024B" },
|
||||
{ 9, "024C" },
|
||||
{10, "025C" },
|
||||
{11, "024-1A" },
|
||||
{12, "025-1A" },
|
||||
{13, "Other" }
|
||||
};
|
||||
|
||||
static struct ch_list {
|
||||
short chan;
|
||||
char* fr;
|
||||
char* country;
|
||||
struct rate_list* rate;
|
||||
struct freq_list* freq;
|
||||
int max_freq;
|
||||
} CHSET[] = {
|
||||
{ 0, 0, 0, 0, 0, 0 },
|
||||
{ 1, "900 Mhz", "Canada, U.S.A., Mexico", 0, freq_list_1, MAXFREQ(freq_list_1) },
|
||||
{ 2, 0, 0, 0, 0, 0 },
|
||||
{ 3, 0, 0, 0, 0, 0 },
|
||||
{ 4, 0, 0, 0, 0, 0 },
|
||||
{ 5, 0, 0, 0, 0, 0 },
|
||||
{ 6, "900 Mhz", "Australia", 0, freq_list_6, MAXFREQ(freq_list_6) },
|
||||
{ 7, 0, 0, 0, 0, 0 },
|
||||
{ 8, 0, 0, 0, 0, 0 },
|
||||
{ 9, "2400 Mhz", "North America", rate_list_2400, freq_list_9, MAXFREQ(freq_list_9) },
|
||||
{ 10, "2400 Mhz", "E.T.S.I", rate_list_2400, freq_list_10, MAXFREQ(freq_list_10) },
|
||||
{ 11, "2400 Mhz", "Japan", rate_list_2400, freq_list_11, MAXFREQ(freq_list_11) },
|
||||
{ 12, "2400 Mhz", "France", rate_list_2400, freq_list_12, MAXFREQ(freq_list_12) },
|
||||
{ 13, "2400 Mhz", "Australia", rate_list_2400, freq_list_13, MAXFREQ(freq_list_13) },
|
||||
{ 14, "2400 Mhz", "Germany", rate_list_2400, freq_list_14, MAXFREQ(freq_list_14) },
|
||||
{ 15, "2400 Mhz", "U.K.(MPT1349),Spain", rate_list_2400, freq_list_15, MAXFREQ(freq_list_15) }
|
||||
};
|
||||
|
||||
char* registrationMode[] = {
|
||||
"NON-TMA",
|
||||
"TMA",
|
||||
"PSP"
|
||||
};
|
||||
|
||||
char* priorityList[] = {
|
||||
"normal",
|
||||
"high",
|
||||
"highest"
|
||||
};
|
||||
|
||||
void
|
||||
usage()
|
||||
{
|
||||
const char *progname = getprogname();
|
||||
|
||||
#if 0
|
||||
fprintf(stderr, "\nArlan configuration utility.\n\n");
|
||||
#endif
|
||||
fprintf(stderr, "Usage: %s <ifname> [<param> <value> ...]\n", progname);
|
||||
fprintf(stderr, "\t<ifname>\tArlan interface name.\n");
|
||||
fprintf(stderr, "\t<param>\t\tParameter name (see below).\n");
|
||||
fprintf(stderr, "\t<value>\t\tNew value for parameter.\n");
|
||||
fprintf(stderr, "Parameter name:\t\tValue:\n");
|
||||
fprintf(stderr, "\tcountry\t\tset Country (9-15)\n");
|
||||
fprintf(stderr, "\tpriority\tset Priority (normal, high, highest)\n");
|
||||
fprintf(stderr, "\ttxretry\t\tset Arlan Tx retry.\n");
|
||||
fprintf(stderr, "or: %s <ifname> stat\n", progname);
|
||||
fprintf(stderr, "\tprint internal arlan statistics block\n");
|
||||
#ifdef ARLCACHE
|
||||
fprintf(stderr,"or: %s <ifname> quality\n", progname);
|
||||
fprintf(stderr,"\tprint receive packet level and quality\n");
|
||||
#endif
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
print_al(struct arl_cfg_param *arl_io)
|
||||
{
|
||||
printf("Arlan-655(IC2000) type 0x%x v%d.%d, radio module type %s\n",
|
||||
arl_io->hardwareType,
|
||||
arl_io->majorHardwareVersion,
|
||||
arl_io->minorHardwareVersion,
|
||||
(arl_io->radioModule < 13) ?
|
||||
radio_type_list[arl_io->radioModule].name : "Unknown" );
|
||||
printf("\tname %s, sid 0x%06x, mode %s, num tx retry %d\n",
|
||||
arl_io->name,
|
||||
*(int *)arl_io->sid,
|
||||
(arl_io->registrationMode < 3) ?
|
||||
registrationMode[arl_io->registrationMode]:"Unknown",
|
||||
arl_io->txRetry );
|
||||
printf("\tchannel set %d, %s, %s\n",
|
||||
arl_io->channelSet,
|
||||
CHSET[arl_io->channelSet].fr,
|
||||
CHSET[arl_io->channelSet].country);
|
||||
printf("\tfrequency %s Mhz, bitrate %s kb/s, priority %s, receive mode %d\n",
|
||||
(CHSET[arl_io->channelSet].freq &&
|
||||
CHSET[arl_io->channelSet].max_freq > arl_io->channelNumber) ?
|
||||
CHSET[arl_io->channelSet].freq[arl_io->channelNumber].name :
|
||||
"unknown",
|
||||
(CHSET[arl_io->channelSet].rate) ?
|
||||
CHSET[arl_io->channelSet].rate[arl_io->spreadingCode].name :
|
||||
"unknown",
|
||||
arl_io->priority <= 2 ?
|
||||
priorityList[arl_io->priority] : "unknown",
|
||||
arl_io->receiveMode);
|
||||
printf("\tether %s",
|
||||
(char *)ether_ntoa((struct ether_addr *)arl_io->lanCardNodeId));
|
||||
printf(" registered to %s\n",
|
||||
(char *)ether_ntoa((struct ether_addr *)arl_io->specifiedRouter));
|
||||
}
|
||||
|
||||
void
|
||||
print_stb( struct arl_stats stb )
|
||||
{
|
||||
printf("Arlan internal statistics block\n\n");
|
||||
printf("%8u\tdatagrams transmitted\n",
|
||||
stb.numDatagramsTransmitted);
|
||||
printf("%8u\tre-transmitted\n",
|
||||
stb.numReTransmissions);
|
||||
printf("%8u\tframes discarded internally in a router\n",
|
||||
stb.numFramesDiscarded);
|
||||
printf("%8u\tdatagrams received\n",
|
||||
stb.numDatagramsReceived);
|
||||
printf("%8u\tduplicate received frame\n",
|
||||
stb.numDuplicateReceivedFrames);
|
||||
printf("%8u\tdatagrams discarded due to unavailable mail box buffer\n",
|
||||
stb.numDatagramsDiscarded);
|
||||
printf("%8d\tmaximum of re-transmissions datagram\n",
|
||||
stb.maxNumReTransmitDatagram);
|
||||
printf("%8d\tmaximum of re-transmissions frame\n",
|
||||
stb.maxNumReTransmitFrames);
|
||||
printf("%8d\tmaximum of consecutive duplicate received frames\n",
|
||||
stb.maxNumConsecutiveDuplicateFrames);
|
||||
printf("%8u\tbytes transmitted\n",
|
||||
stb.numBytesTransmitted);
|
||||
printf("%8u\tbytes received\n",
|
||||
stb.numBytesReceived);
|
||||
printf("%8u\tCRC errors\n",
|
||||
stb.numCRCErrors);
|
||||
printf("%8u\tlength errors\n",
|
||||
stb.numLengthErrors);
|
||||
printf("%8u\tabort errors\n",
|
||||
stb.numAbortErrors);
|
||||
printf("%8u\tTX underuns\n",
|
||||
stb.numTXUnderruns);
|
||||
printf("%8u\tRX overruns\n",
|
||||
stb.numRXOverruns);
|
||||
printf("%8u\tHold Offs (channel tested busy, tx delayed)\n",
|
||||
stb.numHoldOffs);
|
||||
printf("%8u\tframes transmitted\n",
|
||||
stb.numFramesTransmitted);
|
||||
printf("%8u\tframes received\n",
|
||||
stb.numFramesReceived);
|
||||
printf("%8u\treceive frames lost due unavailable buffer\n",
|
||||
stb.numReceiveFramesLost);
|
||||
printf("%8u\tRX buffer overflows \n",
|
||||
stb.numRXBufferOverflows);
|
||||
printf("%8u\tframes discarded due to Address mismatch\n",
|
||||
stb.numFramesDiscardedAddrMismatch);
|
||||
printf("%8u\tframes discarded due to SID mismatch\n",
|
||||
stb.numFramesDiscardedSIDMismatch);
|
||||
printf("%8u\tpolls transmitted\n",
|
||||
stb.numPollsTransmistted);
|
||||
printf("%8u\tpoll acknowledges received\n",
|
||||
stb.numPollAcknowledges);
|
||||
printf("%8u\tstatus vector timeout\n",
|
||||
stb.numStatusVectorTimeouts);
|
||||
printf("%8u\tNACK packets received\n",
|
||||
stb.numNACKReceived);
|
||||
}
|
||||
|
||||
#ifdef ARLCACHE
|
||||
void
|
||||
print_qlt(struct arl_sigcache *qlt)
|
||||
{
|
||||
int i;
|
||||
u_int8_t zero[6] = {0, 0, 0, 0, 0, 0};
|
||||
|
||||
for (i = 0; i < MAXARLCACHE && bcmp(qlt->macsrc, zero, 6); i++) {
|
||||
printf("[%d]:", i+1);
|
||||
printf(" %02x:%02x:%02x:%02x:%02x:%02x,",
|
||||
qlt->macsrc[0]&0xff,
|
||||
qlt->macsrc[1]&0xff,
|
||||
qlt->macsrc[2]&0xff,
|
||||
qlt->macsrc[3]&0xff,
|
||||
qlt->macsrc[4]&0xff,
|
||||
qlt->macsrc[5]&0xff);
|
||||
printf(" rx lvl/qlty: %d/%d,", qlt->level[ARLCACHE_RX],
|
||||
qlt->quality[ARLCACHE_RX]);
|
||||
printf(" tx lvl/qlty: %d/%d", qlt->level[ARLCACHE_TX],
|
||||
qlt->quality[ARLCACHE_TX]);
|
||||
printf("\n");
|
||||
qlt++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
struct ifreq ifr;
|
||||
struct arl_req arl_io;
|
||||
struct ether_addr *ea;
|
||||
struct arl_stats stb;
|
||||
struct arl_sigcache qlt[MAXARLCACHE];
|
||||
int sd, argind, val = -1;
|
||||
long val2;
|
||||
char *param, *value, *value2;
|
||||
|
||||
if (argc < 2)
|
||||
usage();
|
||||
|
||||
sd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (sd < 0)
|
||||
err(1,"socket");
|
||||
strncpy(ifr.ifr_name, argv[1], sizeof(ifr.ifr_name));
|
||||
ifr.ifr_addr.sa_family = AF_INET;
|
||||
bzero(&arl_io, sizeof(arl_io));
|
||||
ifr.ifr_data = (caddr_t)&arl_io;
|
||||
|
||||
if (argc == 2) {
|
||||
if (ioctl(sd, SIOCGARLALL, (caddr_t)&ifr))
|
||||
err(1,"Get ALL");
|
||||
print_al(&arl_io.cfg);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (argc == 3) {
|
||||
if (!strcasecmp(argv[2], "stat")) {
|
||||
strncpy(ifr.ifr_name, argv[1], sizeof(ifr.ifr_name));
|
||||
ifr.ifr_addr.sa_family = AF_INET;
|
||||
ifr.ifr_data = (caddr_t)&stb;
|
||||
if (ioctl(sd, SIOCGARLSTB, (caddr_t)&ifr))
|
||||
err(1,"Get STB");
|
||||
print_stb(stb);
|
||||
exit(0);
|
||||
}
|
||||
#ifdef ARLCACHE
|
||||
if (!strcasecmp( argv[2],"quality")) {
|
||||
printf("\n");
|
||||
strncpy(ifr.ifr_name, argv[1], sizeof(ifr.ifr_name));
|
||||
ifr.ifr_addr.sa_family = AF_INET;
|
||||
ifr.ifr_data = (caddr_t)qlt;
|
||||
if (ioctl(sd, SIOCGARLQLT, (caddr_t)&ifr))
|
||||
err(1,"Get QLT");
|
||||
print_qlt(qlt);
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
arl_io.what_set = 0;
|
||||
|
||||
for (argind = 2; argind < argc; argind += 2) {
|
||||
param = argv[argind];
|
||||
value = argv[argind+1];
|
||||
val = -1;
|
||||
|
||||
if (!strcasecmp(param, "priority")) {
|
||||
if (!strcasecmp(value, "normal"))
|
||||
val = 0;
|
||||
else if (!strcasecmp(value, "high"))
|
||||
val = 1;
|
||||
else if (!strcasecmp(value, "highest"))
|
||||
val = 2;
|
||||
if (val == -1)
|
||||
err( 1, "Bad priority - %s", value);
|
||||
arl_io.cfg.priority = val;
|
||||
arl_io.what_set |= ARLAN_SET_priority;
|
||||
}
|
||||
|
||||
if (!strcasecmp(param, "parent")) {
|
||||
if ((ea = (struct ether_addr*) ether_aton(value)) == NULL)
|
||||
err (1, "Bad parent's MAC - %s", value);
|
||||
for (val = 0; val < 6; val++) {
|
||||
arl_io.cfg.specifiedRouter[val] =
|
||||
(int) ea->octet[val];
|
||||
}
|
||||
arl_io.what_set |= ARLAN_SET_specifiedRouter;
|
||||
}
|
||||
|
||||
if (!strcasecmp(param, "country")) {
|
||||
arl_io.cfg.channelSet = atoi(value);
|
||||
arl_io.what_set |= ARLAN_SET_channelSet;
|
||||
}
|
||||
|
||||
if (!strcasecmp(param, "txretry")) {
|
||||
arl_io.cfg.txRetry = atoi(value);
|
||||
arl_io.what_set |= ARLAN_SET_txRetry;
|
||||
}
|
||||
}
|
||||
|
||||
if (arl_io.what_set) {
|
||||
if (ioctl(sd, SIOCSARLALL, (caddr_t)&ifr))
|
||||
err (1, "Set ALL" );
|
||||
if (ioctl(sd, SIOCGARLALL, (caddr_t)&ifr))
|
||||
err (1, "Get ALL");
|
||||
print_al(&arl_io.cfg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ cmdscanner(void)
|
||||
if ((bp = el_gets(el, &num)) == NULL || num == 0)
|
||||
quit(0, NULL);
|
||||
|
||||
len = (num > MAX_CMDLINE) ? MAX_CMDLINE : num;
|
||||
len = (num > MAX_CMDLINE - 1) ? MAX_CMDLINE - 1 : num;
|
||||
memcpy(cmdline, bp, len);
|
||||
cmdline[len] = 0;
|
||||
history(hist, H_ENTER, bp);
|
||||
@@ -273,7 +273,7 @@ makeargv(void)
|
||||
|
||||
margc = 0;
|
||||
for (cp = cmdline; *cp && (size_t)(cp - cmdline) < sizeof(cmdline) &&
|
||||
n < MAX_MARGV; n++) {
|
||||
n < MAX_MARGV - 1; n++) {
|
||||
while (isspace(*cp))
|
||||
cp++;
|
||||
if (*cp == '\0')
|
||||
|
||||
@@ -1,195 +0,0 @@
|
||||
|
||||
/*
|
||||
* dot.c
|
||||
*
|
||||
* Copyright (c) 2004 Brian Fundakowski Feldman
|
||||
* Copyright (c) 1996-1999 Whistle Communications, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Subject to the following obligations and disclaimer of warranty, use and
|
||||
* redistribution of this software, in source or object code forms, with or
|
||||
* without modifications are expressly permitted by Whistle Communications;
|
||||
* provided, however, that:
|
||||
* 1. Any and all reproductions of the source or object code must include the
|
||||
* copyright notice above and the following disclaimer of warranties; and
|
||||
* 2. No rights are granted, in any manner or form, to use Whistle
|
||||
* Communications, Inc. trademarks, including the mark "WHISTLE
|
||||
* COMMUNICATIONS" on advertising, endorsements, or otherwise except as
|
||||
* such appears in the above copyright notice or in the software.
|
||||
*
|
||||
* THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
|
||||
* REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
|
||||
* WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
|
||||
* REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
|
||||
* SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
|
||||
* IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
|
||||
* RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
|
||||
* WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
* PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "ngctl.h"
|
||||
|
||||
#define UNNAMED "\\<unnamed\\>"
|
||||
|
||||
static int DotCmd(int ac, char **av);
|
||||
|
||||
const struct ngcmd dot_cmd = {
|
||||
DotCmd,
|
||||
"dot [outputfile]",
|
||||
"Produce a GraphViz (.dot) of the entire netgraph.",
|
||||
"If no outputfile is specified, stdout will be assumed.",
|
||||
{ "graphviz", "confdot" }
|
||||
};
|
||||
|
||||
static int
|
||||
DotCmd(int ac, char **av)
|
||||
{
|
||||
struct ng_mesg *nlresp;
|
||||
struct namelist *nlist;
|
||||
FILE *f = stdout;
|
||||
int ch;
|
||||
u_int i;
|
||||
|
||||
/* Get options */
|
||||
optind = 1;
|
||||
while ((ch = getopt(ac, av, "")) != EOF) {
|
||||
switch (ch) {
|
||||
case '?':
|
||||
default:
|
||||
return (CMDRTN_USAGE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ac -= optind;
|
||||
av += optind;
|
||||
|
||||
/* Get arguments */
|
||||
switch (ac) {
|
||||
case 1:
|
||||
f = fopen(av[0], "w");
|
||||
if (f == NULL) {
|
||||
warn("Could not open %s for writing", av[0]);
|
||||
return (CMDRTN_ERROR);
|
||||
}
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
if (f != stdout)
|
||||
(void)fclose(f);
|
||||
return (CMDRTN_USAGE);
|
||||
}
|
||||
|
||||
/* Get list of nodes */
|
||||
if (NgSendMsg(csock, ".", NGM_GENERIC_COOKIE, NGM_LISTNODES, NULL,
|
||||
0) < 0) {
|
||||
warn("send listnodes msg");
|
||||
goto error;
|
||||
}
|
||||
if (NgAllocRecvMsg(csock, &nlresp, NULL) < 0) {
|
||||
warn("recv listnodes msg");
|
||||
goto error;
|
||||
}
|
||||
|
||||
nlist = (struct namelist *)nlresp->data;
|
||||
fprintf(f, "graph netgraph {\n");
|
||||
/* TODO: implement rank = same or subgraphs at some point */
|
||||
fprintf(f, "\tedge [ weight = 1.0 ];\n");
|
||||
fprintf(f, "\tnode [ shape = record, fontsize = 12 ] {\n");
|
||||
for (i = 0; i < nlist->numnames; i++)
|
||||
fprintf(f, "\t\t\"%jx\" [ label = \"{%s:|{%s|[%jx]:}}\" ];\n",
|
||||
(uintmax_t)nlist->nodeinfo[i].id,
|
||||
nlist->nodeinfo[i].name[0] != '\0' ?
|
||||
nlist->nodeinfo[i].name : UNNAMED,
|
||||
nlist->nodeinfo[i].type, (uintmax_t)nlist->nodeinfo[i].id);
|
||||
fprintf(f, "\t};\n");
|
||||
|
||||
fprintf(f, "\tsubgraph cluster_disconnected {\n");
|
||||
fprintf(f, "\t\tbgcolor = pink;\n");
|
||||
for (i = 0; i < nlist->numnames; i++)
|
||||
if (nlist->nodeinfo[i].hooks == 0)
|
||||
fprintf(f, "\t\t\"%jx\";\n",
|
||||
(uintmax_t)nlist->nodeinfo[i].id);
|
||||
fprintf(f, "\t};\n");
|
||||
|
||||
for (i = 0; i < nlist->numnames; i++) {
|
||||
struct ng_mesg *hlresp;
|
||||
struct hooklist *hlist;
|
||||
struct nodeinfo *ninfo;
|
||||
char path[NG_PATHSIZ];
|
||||
u_int j;
|
||||
|
||||
(void)snprintf(path, sizeof(path), "[%jx]:",
|
||||
(uintmax_t)nlist->nodeinfo[i].id);
|
||||
|
||||
/* Get node info and hook list */
|
||||
if (NgSendMsg(csock, path, NGM_GENERIC_COOKIE, NGM_LISTHOOKS,
|
||||
NULL, 0) < 0) {
|
||||
free(nlresp);
|
||||
warn("send listhooks msg");
|
||||
goto error;
|
||||
}
|
||||
if (NgAllocRecvMsg(csock, &hlresp, NULL) < 0) {
|
||||
free(nlresp);
|
||||
warn("recv listhooks msg");
|
||||
goto error;
|
||||
}
|
||||
|
||||
hlist = (struct hooklist *)hlresp->data;
|
||||
ninfo = &hlist->nodeinfo;
|
||||
if (ninfo->hooks == 0) {
|
||||
free(hlresp);
|
||||
continue;
|
||||
}
|
||||
|
||||
fprintf(f, "\tnode [ shape = octagon, fontsize = 10 ] {\n");
|
||||
for (j = 0; j < ninfo->hooks; j++)
|
||||
fprintf(f, "\t\t\"%jx.%s\" [ label = \"%s\" ];\n",
|
||||
(uintmax_t)nlist->nodeinfo[i].id,
|
||||
hlist->link[j].ourhook, hlist->link[j].ourhook);
|
||||
fprintf(f, "\t};\n");
|
||||
|
||||
fprintf(f, "\t{\n\t\tedge [ weight = 2.0, style = bold ];\n");
|
||||
for (j = 0; j < ninfo->hooks; j++)
|
||||
fprintf(f, "\t\t\"%jx\" -- \"%jx.%s\";\n",
|
||||
(uintmax_t)nlist->nodeinfo[i].id,
|
||||
(uintmax_t)nlist->nodeinfo[i].id,
|
||||
hlist->link[j].ourhook);
|
||||
fprintf(f, "\t};\n");
|
||||
|
||||
for (j = 0; j < ninfo->hooks; j++) {
|
||||
/* Only print the edges going in one direction. */
|
||||
if (hlist->link[j].nodeinfo.id > nlist->nodeinfo[i].id)
|
||||
continue;
|
||||
fprintf(f, "\t\"%jx.%s\" -- \"%jx.%s\";\n",
|
||||
(uintmax_t)nlist->nodeinfo[i].id,
|
||||
hlist->link[j].ourhook,
|
||||
(uintmax_t)hlist->link[j].nodeinfo.id,
|
||||
hlist->link[j].peerhook);
|
||||
}
|
||||
free(hlresp);
|
||||
}
|
||||
|
||||
fprintf(f, "};\n");
|
||||
|
||||
free(nlresp);
|
||||
if (f != stdout)
|
||||
(void)fclose(f);
|
||||
return (CMDRTN_OK);
|
||||
error:
|
||||
if (f != stdout)
|
||||
(void)fclose(f);
|
||||
return (CMDRTN_ERROR);
|
||||
}
|
||||
@@ -61,6 +61,7 @@ struct {
|
||||
{ 470000, 470099, "/packages-4.7-release" },
|
||||
{ 480000, 480099, "/packages-4.8-release" },
|
||||
{ 490000, 490099, "/packages-4.9-release" },
|
||||
{ 491000, 491099, "/packages-4.10-release" },
|
||||
{ 300000, 399000, "/packages-3-stable" },
|
||||
{ 400000, 499000, "/packages-4-stable" },
|
||||
{ 510000, 599000, "/packages-5-stable" },
|
||||
|
||||
@@ -59,7 +59,8 @@ int trace = 0;
|
||||
FILE *fd = 0;
|
||||
int margc;
|
||||
int fromatty;
|
||||
char *margv[20];
|
||||
#define MAX_MARGV 20
|
||||
char *margv[MAX_MARGV];
|
||||
char cmdline[200];
|
||||
jmp_buf toplevel;
|
||||
static struct cmd *getcmd __P((char *));
|
||||
@@ -183,7 +184,7 @@ makeargv()
|
||||
register char **argp = margv;
|
||||
|
||||
margc = 0;
|
||||
for (cp = cmdline; *cp;) {
|
||||
for (cp = cmdline; margc < MAX_MARGV - 1 && *cp; ) {
|
||||
while (isspace(*cp))
|
||||
cp++;
|
||||
if (*cp == '\0')
|
||||
|
||||
Reference in new issue
Block a user