Getting /dev/smb* to work.

2002-08-28 Thread Bruce M Simpson

On Wed, Aug 28, 2002 at 12:01:15AM +0200, Dan Larsson wrote:
> While trying to get hardware monitoring to work on my computer I
> found the below procedure to enable the smbus device.
> It didn't get me any closer to actually monitoring the hardware with
> xbmon, lmmon or healthd. But the device is there.

I'd like to add to this. uname is:
FreeBSD triage.dollah.com 4.6-STABLE FreeBSD 4.6-STABLE #1: Sun Aug 25 11:23:33 BST 
2002 [EMAIL PROTECTED]:/usr/src/sys/compile/TRIAGE  i386

Box in question is a Sony Vaio PCG-Z600HEK.  dmesg looks like this:-

pcib0:  on motherboard
...
intpm0:  port 0x1040-0x104f irq 9 at device 
7.3 on pci0
intpm0: I/O mapped 1040
intpm0: intr IRQ 9 enabled revision 0
smbus0:  on intsmb0
smb0:  on smbus0
intpm0: PM I/O mapped 8000 

With kernel config:
[..]
device intpm
device apm0
device smbus
device smb
device iic
device iicbus
device iicsmb
device iicbb
[..]

This supports APM just fine, but SMB goes nowhere. Any clues? When ktracing
processws which use /dev/smb0, it seems that the ioctls simply don't
get handled. I assume this is because something somewhere didn't attach.
>From the above dmesg output I'd infer that nothing's being seen on the smbus.

I've also tried this patch:
http://people.freebsd.org/~nsouch/download/iic-stable.diffs
But it didn't help much (after fixing it up for the current -STABLE).

BMS

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Replacing kernel functions.

2002-08-28 Thread Pawel Jakub Dawidek

On Tue, Aug 27, 2002 at 08:10:14PM -0700, Terry Lambert wrote:
+> The easiest way to do this is to take nullfs and modify it so
+> that it caches the name of the file for the vnode that is
+> returned as a value pointed to by the per layer vnode data
+> area, e.g. modify struct null_node to add a null_name pointer:
[...]

Yes, but I don't want to patch kernel at all.
Everythings should be in one kld module and should works for all file
systems (ufs/ffs, fat32, procfs, etc.). File system shouldn't be
important.

-- 
Pawel Jakub Dawidek
UNIX Systems Administrator
http://garage.freebsd.pl
Am I Evil? Yes, I Am.



msg36543/pgp0.pgp
Description: PGP signature


Mutual Trust Needed (Urgent)

2002-08-28 Thread Engr. Lanre Christian Dickson

Reply to: [EMAIL PROTECTED]  or [EMAIL PROTECTED]

Dear Sir/Madam,

I am Engr. Lanre Christian Dickson, Chairman of the Contract Award and Verification 
Panel set up by the Federal Ministry of Aviation (FMA) for  reconciliation of contract 
claims, recomemdation  and subsequent approvals. I got your contact information from 
the net during my personal search for a reliable/reputable foreign firm and after 
careful deliberations; my colleagues and I decided to contact you for a very 
confidential business transaction of mutual benefit.

During our verification exercise, we came across an over-invoiced contract (Contract 
No: FMA/PED/1473/96). This contract was awarded in July, 1996 and completed in August 
1998, and the original contractor has since been paid his contract sum leaving the 
over-invoiced sum of US$25.5m(Twenty Five Million, Five Hundred Thousand United States 
Dollars). This amount has been left floating in our account with the African 
Continental Bank (ACB), until our recent discovery.

My colleagues and I have decided to seek for the assistance of a reliable for foreign 
partner into whose account the fund will be transferred  for safekeeping and 
disboursement among us. If this proposal is acceptable to you, a “Deed of Transfer” of 
the above contract will be obtained on your behalf to empower you as the legal 
beneficiary of the contract and the sum to be transferred. All necessary and relevant 
documents will be procured for the release and transfer of the fund into your 
nominated bank account.

An application for Foreign Exchange Allocation will be made on your behalf from my 
office to the Federal Ministry of Finance (FMF) and the African Continental Bank (ACB) 
for the subsequent release and transfer of the fund into your nominated account.  
Please be informed that we are working in collaboration with top officials of the 
Federal Ministry of Finance and the African Continental Bank (ACB) who will assist us 
in the transfer of the fund. And with your maximum cooperation, the success of this 
transaction is guaranteed.

We have agreed to compensate you with 25% of the total sum, 70% will be for me and my 
colleagues here, while the remaining 5% have been mapped-out for miscellaneous 
expenses that might be incurred by both parties during the course of this transaction. 
All things being equal, this transaction will be concluded within 6 working days upon 
the day of receipt of your response. 

You are required to email us the following information needed for this transaction:

(1) Your Bank particulars (i.e. Name of the bank, Address, Account number, Account 
name andTelex/Swift code), where you want this fund to be transferred.

(2) Your full name and address

(3) Private Telephone and Fax numbers.

Please treat this transaction with top priority and remember to keep it as 
confidential as possible. As soon as we receive your response, more details about how 
to proceed will be given to you. 

Meanwhile, you can contact me on my direct telephone no: 234 80 331 24007. 

We await your prompt response.

Best Regards, 
Engr. Lanre Christian Dickson
Chairman, Contract Award & Verification Panel 

NB: Pls be informed that the other email addresses as directed belong to two of my 
partners.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Replacing kernel functions.

2002-08-28 Thread Terry Lambert

Pawel Jakub Dawidek wrote:
> On Tue, Aug 27, 2002 at 08:10:14PM -0700, Terry Lambert wrote:
> +> The easiest way to do this is to take nullfs and modify it so
> +> that it caches the name of the file for the vnode that is
> +> returned as a value pointed to by the per layer vnode data
> +> area, e.g. modify struct null_node to add a null_name pointer:
> [...]
> 
> Yes, but I don't want to patch kernel at all.
> Everythings should be in one kld module and should works for all file
> systems (ufs/ffs, fat32, procfs, etc.). File system shouldn't be
> important.

You would make your own stacking module named "pawelfs", derived
from "nullfs".

That module would be the only module you would need.  You would
stack it on any FS that you wanted to be able to the the ioctl()
"PAWELS_MAGIC_GET_NAME" on.

No kernel modifications required.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



SMP+SE7500CW2

2002-08-28 Thread Craig Hawco

Hello,

I tried the changes outlined on the list, but SMP still fails at the same 
point. Any further suggestions? There's quite a few users with this issue. 
A friend of mine went through the lists and counted 18 the other day.

Thanks,
Craig



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Amazing!

2002-08-28 Thread Lerrence Tambert

I can't believe the amount of BS that I'm seeing posted here. Terry, stop posting 
SHIT, please, nobody gives a flying fuck about Zen, or Aristotle, ok?

Then we have all the other people who replied to those trolls, sometimes with 
insulting comments, without realizing they just showed what a bunch of clueless 
fuckwits they are. Never judge a persons IQ by his willing to troll or crapflood. 
Those are not related. And don't assume I've never written good software just because 
I decided to troll a bit. I've probably written more lines of quality C and assembler 
now than most of you will in your entire life.

Then we have the people shouting loud "You're a troll!". That I am and worse, much 
worse, but I do have ethics. Let's not get started on the amount of crapflooding now 
going on freebsd-security@, so the signal/noise ratio was low? Gimme a break, it's 0 
now!

Gentlement, don't confuse kindness with weakness.

Sincerely,
 Lerrence

BTW, greetings to  Jordan Hubbard[1]

[1] 
"When i think of "politics," i think of Jordan Hubbard, flat out lying
about what's in, or going to be in, FreeBSD, or what the system can
do, or what's wrong with the system.  (worth noting: I've come to
understand Kolstad, even see him as a reasonable person.  I see jordan
as a _liar_, period.)  _that's_ not the game that we, or i, play."
 Chris G Demetriou (NetBSD core team)


_
Tired of spam from Hotmail? >>> http://www.digiverse.net
yourname@digiverse - a unique name for your unique personality

_
Promote your group and strengthen ties to your members with [EMAIL PROTECTED] by 
Everyone.net  http://www.everyone.net/?btn=tag

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: why does this sendmail connection take so long?

2002-08-28 Thread Dan Langille

On 22 Aug 2002 at 18:28, Michael Scheidell wrote:

> - Original Message -
> From: ""Dan Langille"" <[EMAIL PROTECTED]>
> Newsgroups: local.freebsd.hackers
> Sent: Thursday, August 22, 2002 1:41 PM
> Subject: why does this sendmail connection take so long?
> 
> 
> > I'd normally attribute this problem to DNS, but I can't track down
> > what DNS problem is occuring.  Note the lag between the first event
> > and the next. Any suggestions?
> 
> might be identd (port 113)

After some testing, I'm inclined to think it's not ident.  The 
network in question is behind a firewall which is doing NAT.  Two 
boxes do not exibit the problem. Two do.  All are FreeBSD 4.6-stable 
created from same source snapshot.

I've tested this from several boxes behind my firewall each time 
emailing to a box outside the firewall.  The test was:

   echo 'hi there'  | mail [EMAIL PROTECTED]

The two boxes which exibit the probem are the DNS server and the 
firewall.  Mail sent from those boxes exhibit identical delays, 
namely a 75 second lag between the first and second event (see below 
for an example; note that I've changed the real domain to 
example.org).  I'm not sure whether this indicates a problem on the 
sending or receiving end.  I suspect sending.  But what the problem 
is I'm not sure yet.

I've been running "tcpdump -i lo0 port 53" to see if I could find 
anything suspect in there, but I didn't.  BTW, what would I be 
looking for if the above delay is caused by DNS?

Thanks.

Aug 28 12:07:24 xeon sendmail[66323]: g7SG7O7G066323: from=dan, 
size=37, class=0, nrcpts=1, 
msgid=<[EMAIL PROTECTED]>, 
relay=dan@localhost

Aug 28 12:08:39 xeon sm-mta[66507]: g7SG8dvj066507: 
from=<[EMAIL PROTECTED]>, size=351, class=0, nrcpts=1, 
msgid=<[EMAIL PROTECTED]>, proto=ESMTP, 
daemon=MTA, relay=localhost [127.0.0.1]

Aug 28 12:08:40 xeon sendmail[66323]: g7SG7O7G066323: 
[EMAIL PROTECTED], ctladdr=dan (1000/1000), delay=00:01:16, 
xdelay=00:01:16, mailer=relay, pri=30028, 
relay=localhost.example.org. [127.0.0.1], dsn=2.0.0, stat=Sent 
(g7SG8dvj066507 Message accepted for delivery)

Aug 28 12:08:42 xeon sm-mta[66509]: g7SG8dvj066507: 
to=<[EMAIL PROTECTED]>, ctladdr=<[EMAIL PROTECTED]> (1000/1000), 
delay=00:00:03, xdelay=00:00:02, mailer=esmtp, pri=30342, 
relay=m20.example.org. [216.187.106.227], dsn=2.0.0, stat=Sent (Ok: 
queued as 169F57A11)
-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



RE: Amazing! Uh, Amazing BSD Arguments?

2002-08-28 Thread chromexa




> ** Original Subject: RE: Amazing!
> ** Original Sender: Lerrence Tambert <[EMAIL PROTECTED]>
> ** Original Date: Wed, 28 Aug 2002 13:00:15 -0400 (EDT)

> ** Original Message follows... 

>
> I can't believe the amount of BS that I'm seeing posted here. Terry, stop posting 
>SHIT, 
please, nobody gives a flying fuck about Zen, or Aristotle, ok?
> 
> Then we have all the other people who replied to those trolls, sometimes with 
>insulting 
comments, without realizing they just showed what a bunch of clueless fuckwits they 
are. 
Never judge a persons IQ by his willing to troll or crapflood. Those are not related. 
And 
don't assume I've never written good software just because I decided to troll a bit. 
I've 
probably written more lines of quality C and assembler now than most of you will in 
your 
entire life.
> 
> Then we have the people shouting loud "You're a troll!". That I am and worse, much 
worse, but I do have ethics. Let's not get started on the amount of crapflooding now 
going on 
freebsd-security@, so the signal/noise ratio was low? Gimme a break, it's 0 now!
> 
> Gentlement, don't confuse kindness with weakness.
> 
> Sincerely,
>  Lerrence
> 
> BTW, greetings to  Jordan Hubbard[1]
> 
> [1] 
> "When i think of "politics," i think of Jordan Hubbard, flat out lying
> about what's in, or going to be in, FreeBSD, or what the system can
> do, or what's wrong with the system.  (worth noting: I've come to
> understand Kolstad, even see him as a reasonable person.  I see jordan
> as a _liar_, period.)  _that's_ not the game that we, or i, play."
>  Chris G Demetriou (NetBSD core team)
> 
> 
> _
> Tired of spam from Hotmail? >>> http://www.digiverse.net
> yourname@digiverse - a unique name for your unique personality
> 
> _
> Promote your group and strengthen ties to your members with [EMAIL PROTECTED] by 
Everyone.net  http://www.everyone.net/?btn=tag
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message


>** - End Original Message --- **

> 

How about judging people by how loud they can snarl? Is that
a good metric? Mainly I lurk unless I have a real tech issue to
discuss. However the recent questions over the viability of
BSD and BSD hacking is important. Now perhaps this should
all happen in chat, but people being what they are will jump
strict categories. Humans are like that you know.

Have Fun,
Sends Steve


Have Fun,
Sends Steve

Download the Lycos Browser at http://lycos.neoplanet.com


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Amazing! (not)

2002-08-28 Thread Poul-Henning Kamp


In message <[EMAIL PROTECTED]>, Lerrence Tambert w
rites:

>And don't assume I've never written good software just
>because I decided to troll a bit. I've probably written more lines
>of quality C and assembler now than most of you will in your entire
>life.

Hahahahaha!  You want us to belive that a lowlife like you, a person
who hides behind sniding pseudonyms rather than stand up and defend
his ideas, a person who resorts to doctoring old quotes to make his
point, a person who uses open proxies to cover his tracks, should
ever have been able to think coherent enough to write quality code ?

Spill the beans, what was it that you wrote ?

Was it a "sp701t" you stole from somebody ?  A r00tk1t with your
very own copyright ?  A tic-tac-toe game for your Commodore 64 ?

To me you sound like a frustrated PFY who had his l33t patch to
FreeBSD turned down because it was a pile of shit, and now you're
out to get revenge at the people who called you on your fraudlent
claims and made your the laughingstock of your equally loosing
#l33td00ds peers.

Here's a dime, get yourself a real OS.

You'd better tell your mom you've been naughty before we do.

Poul-Henning

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: why does this sendmail connection take so long?

2002-08-28 Thread Jim Brown

* Dan Langille <[EMAIL PROTECTED]> [2002-08-28 13:01]:
> On 22 Aug 2002 at 18:28, Michael Scheidell wrote:
> 
> > - Original Message -
> > From: ""Dan Langille"" <[EMAIL PROTECTED]>
> > Newsgroups: local.freebsd.hackers
> > Sent: Thursday, August 22, 2002 1:41 PM
> > Subject: why does this sendmail connection take so long?
> > 
> > 
> > > I'd normally attribute this problem to DNS, but I can't track down
> > > what DNS problem is occuring.  Note the lag between the first event
> > > and the next. Any suggestions?
> > 
> > might be identd (port 113)
> 
> After some testing, I'm inclined to think it's not ident.  The 
> network in question is behind a firewall which is doing NAT.  Two 
> boxes do not exibit the problem. Two do.  All are FreeBSD 4.6-stable 
> created from same source snapshot.
> 
> I've tested this from several boxes behind my firewall each time 
> emailing to a box outside the firewall.  The test was:
> 
>echo 'hi there'  | mail [EMAIL PROTECTED]
> 
> The two boxes which exibit the probem are the DNS server and the 
> firewall.  Mail sent from those boxes exhibit identical delays, 
> namely a 75 second lag between the first and second event (see below 
> for an example; note that I've changed the real domain to 
> example.org).  I'm not sure whether this indicates a problem on the 
> sending or receiving end.  I suspect sending.  But what the problem 
> is I'm not sure yet.
> 
> I've been running "tcpdump -i lo0 port 53" to see if I could find 
> anything suspect in there, but I didn't.  BTW, what would I be 
> looking for if the above delay is caused by DNS?

I don't think you can see 127.0.0.0 traffic this way, BICBW.
In general you should see less than a 2 second reply to any DNS
query if everything is configured correctly.  Most replys are
less than .5 seconds even on a fairly busy network.

> 
> Thanks.
> 
> Aug 28 12:07:24 xeon sendmail[66323]: g7SG7O7G066323: from=dan, 
> size=37, class=0, nrcpts=1, 
> msgid=<[EMAIL PROTECTED]>, 
> relay=dan@localhost
> 
> Aug 28 12:08:39 xeon sm-mta[66507]: g7SG8dvj066507: 
> from=<[EMAIL PROTECTED]>, size=351, class=0, nrcpts=1, 
> msgid=<[EMAIL PROTECTED]>, proto=ESMTP, 
> daemon=MTA, relay=localhost [127.0.0.1]
> 
> Aug 28 12:08:40 xeon sendmail[66323]: g7SG7O7G066323: 
> [EMAIL PROTECTED], ctladdr=dan (1000/1000), delay=00:01:16, 
> xdelay=00:01:16, mailer=relay, pri=30028, 
> relay=localhost.example.org. [127.0.0.1], dsn=2.0.0, stat=Sent 
> (g7SG8dvj066507 Message accepted for delivery)
> 
> Aug 28 12:08:42 xeon sm-mta[66509]: g7SG8dvj066507: 
> to=<[EMAIL PROTECTED]>, ctladdr=<[EMAIL PROTECTED]> (1000/1000), 
> delay=00:00:03, xdelay=00:00:02, mailer=esmtp, pri=30342, 
> relay=m20.example.org. [216.187.106.227], dsn=2.0.0, stat=Sent (Ok: 
> queued as 169F57A11)

OK, I'm going to try to analyze this *without* my Sendmail tome
handy (it's on another continent)...

Looks like you've got sendmail on the local machine to 
first relay to host localhost.example.org  probably in /etc/mail/sendmail.cf.

I'd suggest just setting your relayhost to the firewall machine.
(And set the firewall relayhost to nothing- let him do final transfer.)
No- I don't remember quirky sendmail variable- web over to sendmail.org
or read the config file notes.

Another test you should try is to just simulate the mail exchange 
via telnet.  Run through the protocol (helo, mail from:, rcpt to:, data)
and see performance.  Also check how long it takes to close the
tcp connection.  I think that is also tunable via sendmail.cf


Getting the split mail setup working correctly is tricky, but
there are some examples in the big Sendmail book.


Probably should move this to -questions...


Hope this helps,
jpb
===

[snip]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Replacing kernel functions.

2002-08-28 Thread Pawel Jakub Dawidek

On Wed, Aug 28, 2002 at 05:03:23AM -0700, Terry Lambert wrote:
+> -- Terry

Thanks to Your help I've found maybe better way to do this.

I could catch open(), and:

int myopen(struct proc *p, struct open_args *uap)
{
int ret;

if ((ret = open(p, uap)) != 0)
return (ret);

/*
 * And here I can cache uap->name and change close() function address,
 * where address of those functions is here:
 * p->p_fd->fd_ofiles[p->p_retval[0]]->f_ops->fo_close
 */

return (0);
}

This is much more complicated, because if I will change address of this
function, it changes for every descriptor on this file system.
So I need cache original address of fo_close() functions, etc.
But this should works, I'm testing it at the moment.

-- 
Pawel Jakub Dawidek
UNIX Systems Administrator
http://garage.freebsd.pl
Am I Evil? Yes, I Am.



msg36552/pgp0.pgp
Description: PGP signature


Re: Getting /dev/smb* to work.

2002-08-28 Thread Nate Lawson

On Wed, 28 Aug 2002, Bruce M Simpson wrote:
> On Wed, Aug 28, 2002 at 12:01:15AM +0200, Dan Larsson wrote:
> > While trying to get hardware monitoring to work on my computer I
> > found the below procedure to enable the smbus device.
> > It didn't get me any closer to actually monitoring the hardware with
> > xbmon, lmmon or healthd. But the device is there.
> 
> I'd like to add to this. uname is:
> FreeBSD triage.dollah.com 4.6-STABLE FreeBSD 4.6-STABLE #1: Sun Aug 25 11:23:33 BST 
>2002 [EMAIL PROTECTED]:/usr/src/sys/compile/TRIAGE  i386
> 
> pcib0:  on motherboard
> ...
> intpm0:  port 0x1040-0x104f irq 9 at 
>device 7.3 on pci0
> intpm0: I/O mapped 1040
> intpm0: intr IRQ 9 enabled revision 0
> smbus0:  on intsmb0
> smb0:  on smbus0
> intpm0: PM I/O mapped 8000 
> 
> This supports APM just fine, but SMB goes nowhere. Any clues? When ktracing
> processws which use /dev/smb0, it seems that the ioctls simply don't
> get handled. I assume this is because something somewhere didn't attach.
> >From the above dmesg output I'd infer that nothing's being seen on the smbus.

What error is open or ioctl returning in your ktrace?  EINVAL?  boot -v
will give you more info about the attach progress.

-Nate


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Replacing kernel functions.

2002-08-28 Thread Pawel Jakub Dawidek

On Wed, Aug 28, 2002 at 08:30:18PM +0200, Pawel Jakub Dawidek wrote:
+> On Wed, Aug 28, 2002 at 05:03:23AM -0700, Terry Lambert wrote:
+> +> -- Terry
+> 
+> Thanks to Your help I've found maybe better way to do this.
[...]
+> But this should works, I'm testing it at the moment.

Yes, working fine, thanks.

-- 
Pawel Jakub Dawidek
UNIX Systems Administrator
http://garage.freebsd.pl
Am I Evil? Yes, I Am.



msg36554/pgp0.pgp
Description: PGP signature


Re: why does this sendmail connection take so long?

2002-08-28 Thread Terry Lambert

Dan Langille wrote:
> I've tested this from several boxes behind my firewall each time
> emailing to a box outside the firewall.  The test was:
> 
>echo 'hi there'  | mail [EMAIL PROTECTED]

echo 'hi there'  | mail -v [EMAIL PROTECTED]

?

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Peri Doka Thyssen Huennebeck

2002-08-28 Thread USED FORMWORK

Dear Sir,

our company is specialized in Import and Export used Formwor Worldwide. We
are searching for partners for develloping 
our activity.

Please contact us if you are interested in such an activity.

Best Regards.

S.BUTAUX.

Tel: + 49 177 57 57 329
Fax: + 49 25 61 95 950 4001
www.formwork.biz

Stabilo  ??  ,  ,  ???
?? ??? ?? 
 DOKA, PERI, THYSSEN HUNNEBECK, MEVA, PLETTAC, LAYHER ? ??. 
 ? ?? ? ?? ???. 
 ?  ?? ?? ?? ??.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



toggling promiscuous mode logging on NICs

2002-08-28 Thread Julien Benoist

This is a patch allowing to control kernel logging of promiscuous mode changes 
on network interfaces through sysctl (enabled by default) :
kern.log_promisc=1

I dont know if this mib should be placed somewhere else, nor if the feature 
itself could interest anyone... Patch attached anyway.

-- 
Julien Benoist



--- /usr/src.old/sys/net/if.c	Sun Apr 28 07:40:25 2002
+++ /usr/src/sys/net/if.c	Thu Aug 29 03:52:06 2002
@@ -80,6 +80,10 @@
 static void if_slowtimo __P((void *));
 static void link_rtrequest __P((int, struct rtentry *, struct rt_addrinfo *));
 static int  if_rtdel __P((struct radix_node *, void *));
+static int log_promisc = 1;
+
+SYSCTL_INT(_kern, OID_AUTO, log_promisc, CTLFLAG_RW,
+	   &log_promisc, 0 , "toggle promiscuity mode");
 
 SYSINIT(interfaces, SI_SUB_PROTO_IF, SI_ORDER_FIRST, ifinit, NULL)
 
@@ -1245,14 +1249,18 @@
 		if (ifp->if_pcount++ != 0)
 			return (0);
 		ifp->if_flags |= IFF_PROMISC;
-		log(LOG_INFO, "%s%d: promiscuous mode enabled\n",
-		ifp->if_name, ifp->if_unit);
+		if (log_promisc==1) {
+			log(LOG_INFO, "%s%d: promiscuous mode enabled\n",
+			ifp->if_name, ifp->if_unit);
+		}
 	} else {
 		if (--ifp->if_pcount > 0)
 			return (0);
 		ifp->if_flags &= ~IFF_PROMISC;
-		log(LOG_INFO, "%s%d: promiscuous mode disabled\n",
-		ifp->if_name, ifp->if_unit);
+		if (log_promisc==1) {
+			log(LOG_INFO, "%s%d: promiscuous mode disabled\n",
+			ifp->if_name, ifp->if_unit);
+		}
 	}
 	ifr.ifr_flags = ifp->if_flags;
 	error = (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);



Re: toggling promiscuous mode logging on NICs

2002-08-28 Thread Terry Lambert

Julien Benoist wrote:
> This is a patch allowing to control kernel logging of promiscuous mode changes
> on network interfaces through sysctl (enabled by default) :
> kern.log_promisc=1
> 
> I dont know if this mib should be placed somewhere else, nor if the feature
> itself could interest anyone... Patch attached anyway.

In a general sense, it's probably abut time to add a class
parameter or two (one a bitmap, the other a bitmap within that
bitmap) to all of the kernel display data.

That would let you block all messages of a class, without the
need to introduce per-printf sysctl's.

This sort of goes with PHK's idea that the console code needs
a rethink.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: top shows all zeroes.

2002-08-28 Thread Patrick Thomas


Ok, this seems to have died down a bit, and my own urgency has passed
since it is no longer manifesting itself on my test machinehowever,
two things come to mind:

1. is it possible that arbitrary top output is now suspect on machines
that have manifested this behavior ?  I am not showing all zeros anymore,
but who is to say that what I am seeing is correct ?  My vmstat -i now
yields:

rtc irq8 29272122 66

and I am seeing a rate of 128 on normal systems.  So maybe my top output
is still wrong, even though it isn't all zeros.

2. What is to be done ?  I have no reason to believe this won't crop up on
4.6.2 or later...does anyone else ?

thanks.  pat.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message