Re: Looking for FreeBSD kernel debugging help

2003-06-11 Thread Soren Kristensen
Hi Everybody,

First, thanks to everybody offering tips and help. The good news is that 
the problem is solved.

I couldn't wait, so I finally decided to learn a little FreeBSD kernel 
debugging. After reading lots of not very comprehensive man pages and 
other guides, I got a 4.4 kernel compiled with ddb and set up remote 
debugging over the 2nd serial port with gdb. Again, after reading even 
more on using gdb, I set a bunch of breakpoints a did a little tracing 
and got the problem localized to a PCI configuration problem, probably a 
undocumented hardware bug in the Geode SC1100 processor combined with 
not very smart PCI config code in FreeBSD. I have patched FreeBSD to 
boot on the net4801 board, more details after I know exactly what's the 
issue is.

Lesson learned:

Advanced FreeBSD documentation sucks if you're not a kernel hacker, but 
remote kernel debugging works great and are actually kinda fun

Regards,

Soren Kristensen

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Looking for FreeBSD kernel debugging help

2003-06-11 Thread Daniel O'Connor
On Wed, 11 Jun 2003 18:22, Soren Kristensen wrote:
 Lesson learned:

 Advanced FreeBSD documentation sucks if you're not a kernel hacker, but
 remote kernel debugging works great and are actually kinda fun

Procedural things are more likely to be usefully documented in the handbook or 
FAQ (or The Complete FreeBSD), rather than a specific man page.

They can be a bit stale though :(

Serial GDB is very nice.. You can even do firewire debugging, but I guess you 
guys can't really use that :)
(Firewire mini-PCI board? 8-)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
The nice thing about standards is that there
are so many of them to choose from.
  -- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140  AE4B 319B 41F4 5D17 FDD5

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Looking for FreeBSD kernel debugging help

2003-06-11 Thread Terry Lambert
Daniel O'Connor wrote:
 Serial GDB is very nice.. You can even do firewire debugging, but I guess you
 guys can't really use that :)
 (Firewire mini-PCI board? 8-)

Someone should port the network debugging from Darwin using
the tiny IP stack from NetBSD.

-- Terry
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Policy Routing / NAT Question

2003-06-11 Thread Ryan Wilkins
Hello..

I'm setting up a TCP protocol testbed for testing various enhanced TCP
stacks for use over high bandwidth, high latency links such as
Satellite.  Due to hardware limitations of the FreeBSD boxes we're using
(1U rackmount), there are no expansion slots left for additional network
cards.  This forces me to have to run some traffic over one gateway and
the rest of the traffic over another gateway, all through one ethernet. 
The problem I have is I need to change the source address of some
packets based on destination address.  I was able to accomplish this in
Linux using Source NAT.  I'm not real well versed in FreeBSD hence the
reason I'm asking for any assistance here.  Does anyone have an idea how
to change the source address based on destination address?

Thanks in advance for any help.

Ryan Wilkins

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Policy Routing / NAT Question

2003-06-11 Thread Vlad GALU
On 11 Jun 2003 08:55:53 -0400
Ryan Wilkins [EMAIL PROTECTED] wrote:

 Hello..
 
 I'm setting up a TCP protocol testbed for testing various enhanced TCP
 stacks for use over high bandwidth, high latency links such as
 Satellite.  Due to hardware limitations of the FreeBSD boxes we're
 using(1U rackmount), there are no expansion slots left for additional
 network cards.  This forces me to have to run some traffic over one
 gateway and the rest of the traffic over another gateway, all through
 one ethernet. The problem I have is I need to change the source
 address of some packets based on destination address.  I was able to
 accomplish this in Linux using Source NAT.  I'm not real well versed
 in FreeBSD hence the reason I'm asking for any assistance here.  Does
 anyone have an idea how to change the source address based on
 destination address?
 
yes.

in the ipnat configuration file you should write something like this:

map interface from source to destination - nat address

one thing though ... I've noticed the kernel trying to send the packets
on the default gateway, no matter what the nat address was. So I
used ipfw as well, for policy routing of nat'ed packets. I might have
done something wrong as well, I really don't know, but searching
the newsgroups archives I found no answer at all, and this seemed
to be the only option.


 Thanks in advance for any help.
 
 Ryan Wilkins
 
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]
 


-- 
Vlad GALU
Network Administrator VipNET Bucharest
tel: 021/3039940
email: [EMAIL PROTECTED]
web: http://www.vipnet.ro
PGP: http://mirapoint.vipnet.ro/public_key.pgp



pgp0.pgp
Description: PGP signature


Re: Policy Routing / NAT Question

2003-06-11 Thread Dirk-Willem van Gulik


On Wed, 11 Jun 2003, Vlad GALU wrote:

  Satellite.  Due to hardware limitations of the FreeBSD boxes we're
  using(1U rackmount), there are no expansion slots left for additional

There are several 4, 6 and 8 port ethernet cards on the marked - which
only take up one slot. I've also solved this issue in the past by using an
expensive switch and a gigabit card to fan out to 100mbit/full-duplex.

Dw

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Looking for FreeBSD kernel debugging help

2003-06-11 Thread Nat Lanza
On Wed, 2003-06-11 at 06:22, Terry Lambert wrote:
 Someone should port the network debugging from Darwin using
 the tiny IP stack from NetBSD.

Well, there's this:

http://ipgdb.sourceforge.net/

 IPGDB is a collection of extensions to GDB and FreeBSD-4.3
 to allow two-machine kernel debugging over UDP. It behaves
 much like two-machine kernel debugging over serial ports. 
 
 These extensions can easily be applied to other releases of
 FreeBSD. With a little bit of modification, these extension
 can be applied to other BSD variants.

It hasn't been updated in a while, but it's definitely a start. It works
pretty well for 4.3, and I know it's been updated to work with 4.6
(though possibly not in the sourceforge distribution).


--nat

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Looking for FreeBSD kernel debugging help

2003-06-11 Thread Richard Sharpe
On Wed, 11 Jun 2003, Nat Lanza wrote:

 On Wed, 2003-06-11 at 06:22, Terry Lambert wrote:
  Someone should port the network debugging from Darwin using
  the tiny IP stack from NetBSD.
 
 Well, there's this:
 
 http://ipgdb.sourceforge.net/
 
  IPGDB is a collection of extensions to GDB and FreeBSD-4.3
  to allow two-machine kernel debugging over UDP. It behaves
  much like two-machine kernel debugging over serial ports. 
  
  These extensions can easily be applied to other releases of
  FreeBSD. With a little bit of modification, these extension
  can be applied to other BSD variants.
 
 It hasn't been updated in a while, but it's definitely a start. It works
 pretty well for 4.3, and I know it's been updated to work with 4.6
 (though possibly not in the sourceforge distribution).

I think that Groggy was working on this a while back.

Regards
-
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


build-tools and sed

2003-06-11 Thread Daniel C. Sobral
Shouldn't sed be part of the build tools?

It's used in src//gnu/usr.bin/binutils/libbfd/Makefile, at the very least:

targmatch.h: targmatch.sed config.bfd
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd}  ${.TARGET}
config.h: config.h.fbsd
.if ${TARGET_ARCH} == i386
sed -e 's,!!TRAD_HEADER!!,hosts/i386bsd.h,g' ${.ALLSRC}  
${.TARGET}
.else
sed -e 's,!!TRAD_HEADER!!,,g' ${.ALLSRC}  ${.TARGET}
.endif

Which was rather annoying when I got caught in the sed bug. Updating 
sources did not fix the problem, because it kept using the install sed...

--
Daniel C. Sobral   (8-DCS)
Gerencia de Operacoes
Divisao de Comunicacao de Dados
Coordenacao de Seguranca
VIVO Centro Oeste Norte
Fones: 55-61-313-7654/Cel: 55-61-9618-0904
E-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Outros:
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
May the Fleas of a Thousand Camels infest one of your Erogenous Zones.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Policy Routing / NAT Question

2003-06-11 Thread Ruslan Ermilov
On Wed, Jun 11, 2003 at 08:55:53AM -0400, Ryan Wilkins wrote:
 Hello..
 
 I'm setting up a TCP protocol testbed for testing various enhanced TCP
 stacks for use over high bandwidth, high latency links such as
 Satellite.  Due to hardware limitations of the FreeBSD boxes we're using
 (1U rackmount), there are no expansion slots left for additional network
 cards.  This forces me to have to run some traffic over one gateway and
 the rest of the traffic over another gateway, all through one ethernet. 
 The problem I have is I need to change the source address of some
 packets based on destination address.  I was able to accomplish this in
 Linux using Source NAT.  I'm not real well versed in FreeBSD hence the
 reason I'm asking for any assistance here.  Does anyone have an idea how
 to change the source address based on destination address?
 
If all of these possible source addresses belong to the same interface of
the box in question (it's unclear from your message), this can be done
with route(8).  For example:

# ifconfig rl0 inet
rl0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
inet 192.168.4.115 netmask 0xff00 broadcast 192.168.4.255
inet 10.0.0.1 netmask 0xff00 broadcast 10.255.255.255
inet 10.0.0.2 netmask 0x broadcast 10.0.0.2
# route add -net 11 10.0.0.3
add net 11: gateway 10.0.0.3
# route add -net 12 -ifa 10.0.0.2 10.0.0.4
add net 12: gateway 10.0.0.4

The route to the network 12 says to use 10.0.0.2 as the source
address when sending anonymous (with unfilled source address)
datagrams.

But if you need to change the traffic originated from other
hosts on your box, there are several NAT solutions for you.


Cheers,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software Ltd,
[EMAIL PROTECTED]   FreeBSD committer


pgp0.pgp
Description: PGP signature


Re: remote gdb through terminal server?

2003-06-11 Thread Kip Macy
The filers here are all debugged through terminal servers using 
gdb on the client and a gdb stub on the server. So if it doesn't 
work it is likely due to your setup or a bug in FreeBSD's gdb stub.


-Kip 

On Wed, 11 Jun 2003, Brooks Davis wrote:

 Does anyone know if it's possiable to run remote GDB through a terminal
 server?  Connections to the terminal server are via SSH to portslave.
 I've got some boxes I upgraded fom 4.6-STABLE to 4.8-STABLE which now
 reliably crash under heavy FS load that I'm trying to debug and my
 easiest acess is via the terminal server.
 
 -- Brooks
 
 -- 
 Any statement of the form X is the one, true Y is FALSE.
 PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
 


pgp0.pgp
Description: PGP signature
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Policy Routing / NAT Question

2003-06-11 Thread Ryan Wilkins
Hi.. thanks for your response.. it did exactly what I needed.  I tried
some of the other solutions provided earlier in the day and ended up
locking up a machine 340 miles away from here which is a good 6-7 hour
drive from where I am currently.

Thanks again,
Ryan Wilkins


On Wed, 2003-06-11 at 14:15, Ruslan Ermilov wrote:
 On Wed, Jun 11, 2003 at 08:55:53AM -0400, Ryan Wilkins wrote:
  Hello..
  
  I'm setting up a TCP protocol testbed for testing various enhanced TCP
  stacks for use over high bandwidth, high latency links such as
  Satellite.  Due to hardware limitations of the FreeBSD boxes we're using
  (1U rackmount), there are no expansion slots left for additional network
  cards.  This forces me to have to run some traffic over one gateway and
  the rest of the traffic over another gateway, all through one ethernet. 
  The problem I have is I need to change the source address of some
  packets based on destination address.  I was able to accomplish this in
  Linux using Source NAT.  I'm not real well versed in FreeBSD hence the
  reason I'm asking for any assistance here.  Does anyone have an idea how
  to change the source address based on destination address?
  
 If all of these possible source addresses belong to the same interface of
 the box in question (it's unclear from your message), this can be done
 with route(8).  For example:
 
 # ifconfig rl0 inet
 rl0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
 inet 192.168.4.115 netmask 0xff00 broadcast 192.168.4.255
 inet 10.0.0.1 netmask 0xff00 broadcast 10.255.255.255
 inet 10.0.0.2 netmask 0x broadcast 10.0.0.2
 # route add -net 11 10.0.0.3
 add net 11: gateway 10.0.0.3
 # route add -net 12 -ifa 10.0.0.2 10.0.0.4
 add net 12: gateway 10.0.0.4
 
 The route to the network 12 says to use 10.0.0.2 as the source
 address when sending anonymous (with unfilled source address)
 datagrams.
 
 But if you need to change the traffic originated from other
 hosts on your box, there are several NAT solutions for you.
 
 
 Cheers,
-- 
Ryan Wilkins [EMAIL PROTECTED]
Deadfrog Networking Systems

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [Cerb-list] CerbNG v1.0-RC2 is now avaliable!

2003-06-11 Thread clemens fischer
* Pawel Jakub Dawidek:

 We are proudly announce that CerbNG-1.0 Release Candidate 2 is now
 avaliable.

congratulations!  may i suggest to always include the CVS tag of any
release announced here?  i just tried to make(1) the CVS HEAD on my
freebsd-4.8, but this failed the compilation.

  clemens
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [Cerb-list] CerbNG v1.0-RC2 is now avaliable!

2003-06-11 Thread Pawel Jakub Dawidek
On Wed, Jun 11, 2003 at 07:20:26PM +0200, clemens fischer wrote:
+  We are proudly announce that CerbNG-1.0 Release Candidate 2 is now
+  avaliable.
+ 
+ congratulations!  may i suggest to always include the CVS tag of any
+ release announced here?  i just tried to make(1) the CVS HEAD on my
+ freebsd-4.8, but this failed the compilation.

Could you please send any compilation output on cerb mailing list?
Maybe it's just because cerb releases don't needed bison and source
from CVS head branch does.

-- 
Pawel Jakub Dawidek   [EMAIL PROTECTED]
UNIX Systems Programmer/Administrator http://garage.freebsd.pl
Am I Evil? Yes, I Am! http://cerber.sourceforge.net


pgp0.pgp
Description: PGP signature


Re: [Cerb-list] CerbNG v1.0-RC2 is now avaliable!

2003-06-11 Thread clemens fischer
* Pawel Jakub Dawidek:

 On Wed, Jun 11, 2003 at 07:20:26PM +0200, clemens fischer wrote:
 +  We are proudly announce that CerbNG-1.0 Release Candidate 2 is now
 +  avaliable.
 + 
 + congratulations!  may i suggest to always include the CVS tag of any
 + release announced here?  i just tried to make(1) the CVS HEAD on my
 + freebsd-4.8, but this failed the compilation.

 Could you please send any compilation output on cerb mailing list?
 Maybe it's just because cerb releases don't needed bison and source
 from CVS head branch does.

(i have bison installed)  this is what i did:

 1509  cvs up -A
 1510  make clean all install

=== ucerb
cc -O -pipe  -g -Wall -Wno-unused -I. -I/www/src/cerb-ng/ucerb/../kcerb -c -o clang2.o 
clang2.c
In file included from clang2.y:21:
libtree.h:5: y.tab.h: No such file or directory
In file included from clang2.y:21:
libtree.h:8: syntax error before `int'
libtree.h:9: syntax error before `int'
libtree.h:10: syntax error before `expr_list'
libtree.h:11: syntax error before `char'
libtree.h:12: syntax error before `int'
libtree.h:13: syntax error before `int'
libtree.h:14: syntax error before `char'
libtree.h:15: syntax error before `expr'
libtree.h:16: syntax error before `char'
libtree.h:17: syntax error before `char'
libtree.h:18: syntax error before `char'
libtree.h:19: syntax error before `expr'
*** Error code 1

Stop in /www/src/cerb-ng/ucerb.
*** Error code 1

Stop in /www/src/cerb-ng.

  clemens
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]