Re: irq status

2000-11-03 Thread Alexander Anderson

In mailing.freebsd.hackers, you wrote:

  Is their a tool out their or does anyone have a quick bit of code /
  hack that will "probe" all of the irqs on my box and tell me which
  ones are used / available??

 No.  You can glean some of this information from various
 metaconfiguration interface, but the question you're asking suggests
 that you're trying to do something wrong anyway.

 Why don't you tell us a bit more about what you want this information
 for?

I got curious too and decided to join. If you have dealt with Linux, it
has 'interrupts' file in /proc filesystem. It tells you what IRQs are
currently in use and what's using them. Is there something similar on
FreeBSD?


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



Re: localhost cannot be resolved

2000-08-12 Thread Alexander Anderson

 Which version of FreeBSD are you using?

4.0-RELEASE

  telnet localhost
 cactoss localhost: No address associated with hostname
  echo $?
 cactoss 1
 
 It seems getaddrinfo(3) was failed.
 What's curious.  Rlogin, rsh and ftp call getaddrinfo(3), too.  Why is
 it only telnet and fetchmail?

I tried to look at the sources for telnet. In file commands.c:2292, there's
an assignment of variable "family". I couldn't understand where the variable
is coming from. Still, I wrote a simple program to see under what
circumstances getaddrinfo fails for localhost. It doesn't seem to fail at
all?!..

#include stdio.h
#include sys/types.h
#include sys/socket.h
#include netdb.h
#include string.h

int main( int argc, char** argv ) {
  struct addrinfo hints, *res;
  int status;
  
  if ( argc != 2 ) {
fprintf( stderr, "usage: %s hostname\n", argv[0] );
exit(2);
  }
  
  memset( hints, 0, sizeof(hints) );
  /*hints.ai_flags = AI_NUMERICHOST;*/
  /*hints.ai_flags = AI_PASSIVE;*/
  hints.ai_flags = AI_CANONNAME;
  /*hints.ai_family = PF_UNSPEC;*/
  hints.ai_family = AF_INET6;
  hints.ai_socktype = SOCK_STREAM;

  status = getaddrinfo( argv[1], "telnet", hints, res );
  if ( status == 0 ) {
printf( "success\n" );
  } else {
fprintf( stderr, "%s\n", gai_strerror( status ) );
  }
  
  return 0;
}

[skipped]

 You don't have SMTP/IPv6 listen.  This should be OK.
 So, SMTP connection to ::1 was fail.  Then, SMTP connection to
 127.0.0.1 was tried.
 It seems IDENT query was made in correspondings to SMTP connection to
 127.0.0.1.  I think you have SMTP/IPv4 listen.

Yes, sendmail is listening on port 25. I can telnet 127.0.0.1 25.

Could you please take a look at `ifconfig lo0`:

lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 
inet6 ::1 prefixlen 128 
inet 127.0.0.1 netmask 0xff00 

Does it look okay?

[skipped]

 I think libtool has no relation with this problem.  It may rely on
 firewall rule.

My firewall is open. I decided that I'd only block certain ports:

# ipfw show
00100  560   33466 allow ip from any to any via lo0
002000   0 deny ip from any to 127.0.0.0/8
00300   21 924 allow tcp from any to any 25 via tun0 setup
00400   572524 allow tcp from any to any 80 via tun0 setup
00500   10 424 deny tcp from any to any 1-1024 in recv tun0
00600   682860 deny tcp from any 1-1024 to any out xmit tun0
007000   0 deny tcp from any to any 6000-6063 in recv tun0
008000   0 deny tcp from any 6000-6063 to any out xmit tun0
009000   0 deny tcp from any to any 3306 in recv tun0
010000   0 deny tcp from any 3306 to any out xmit tun0
65000 4982 1773612 allow ip from any to any
655350   0 deny ip from any to any

I also tried flushing all the rules and allowing all traffic to see whether
the firewall was the cause of my problem. I didn't change anything, so I
doubt it is the firewall.

One question. Firewall rules apply to both IPv4 and IPv6, right? There
shouldn't be separate rules to IPv6, should there?

Thanks!


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



localhost cannot be resolved

2000-08-11 Thread Alexander Anderson

Hello everyone!

I sent this question to freebsd-questions, but no one had replied, so I
decided to try my luck here.

I'm having trouble resolving "localhost" for telnet and fetchmail. All
other programs (ftp, rlogin, rsh, ping, lynx) seem to understand
"localhost".

I'm going to include my configuration files. Please tell me if you'd like
to get more info on something.

 cat /etc/hosts
127.0.0.1   localhost localhost.my.domain myname.my.domain
::1 localhost localhost.my.domain myname.my.domain
 cat /etc/host.conf
hosts
bind
 cat /etc/resolv.conf
nameserver 209.226.175.224
nameserver 204.101.251.2

All looks right, does it?

Now, when I run telnet or fetchmail, they complain.

 telnet localhost
localhost: No address associated with hostname
 echo $?
1

 fetchmail
9 messages for MYUSERNAME at pop.mail.yahoo.com (64648 octets).
reading message 1 of 9 (13403 octets) .fetchmail: SMTP connect to
localhost failed
fetchmail: SMTP transaction error while fetching from pop.mail.yahoo.com
fetchmail: Query status=SMTP
 echo $?
10

At the same time fetchmail causes ipfw to produce these messages:
Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP ::0001:25 from
::0001:1063
Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP 127.0.0.1:113
from 127.0.0.1:1065
Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP ::0001:25 from
::0001:1066
Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP 127.0.0.1:113
from 127.0.0.1:1067

Actually, could someone tell me, what does ::0001 mean? Should this be in
/etc/hosts with an alias of localhost?

These strange things started to happen soon after I cvsup'ed ports-all and
reinstalled libtool. I also compiled firewall support into the kernel a
few days ago. Just in case any of this might be related to the problem.

Thank you all for any suggestions!



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