Re: usr.bin/aucat fails to build on sparc64 -current

2009-07-27 Thread Alexandre Ratchov
On Sun, Jul 26, 2009 at 04:23:05PM -0700, Brian Keefer wrote:
 # make
 cc -O2 -pipe  -DDEBUG -Wall -Wstrict-prototypes -Wundef   -c
 /usr/src/usr.bin/aucat/aucat.c
 cc -O2 -pipe  -DDEBUG -Wall -Wstrict-prototypes -Wundef   -c
 /usr/src/usr.bin/aucat/abuf.c
 cc -O2 -pipe  -DDEBUG -Wall -Wstrict-prototypes -Wundef   -c
 /usr/src/usr.bin/aucat/aparams.c
 cc -O2 -pipe  -DDEBUG -Wall -Wstrict-prototypes -Wundef   -c
 /usr/src/usr.bin/aucat/aproc.c
 cc -O2 -pipe  -DDEBUG -Wall -Wstrict-prototypes -Wundef   -c
 /usr/src/usr.bin/aucat/dev.c
 cc -O2 -pipe  -DDEBUG -Wall -Wstrict-prototypes -Wundef   -c
 /usr/src/usr.bin/aucat/midi.c
 cc -O2 -pipe  -DDEBUG -Wall -Wstrict-prototypes -Wundef   -c
 /usr/src/usr.bin/aucat/file.c
 cc -O2 -pipe  -DDEBUG -Wall -Wstrict-prototypes -Wundef   -c
 /usr/src/usr.bin/aucat/headers.c
 cc -O2 -pipe  -DDEBUG -Wall -Wstrict-prototypes -Wundef   -c
 /usr/src/usr.bin/aucat/safile.c
 cc -O2 -pipe  -DDEBUG -Wall -Wstrict-prototypes -Wundef   -c
 /usr/src/usr.bin/aucat/miofile.c
 /usr/src/usr.bin/aucat/miofile.c: In function `miofile_new':
 /usr/src/usr.bin/aucat/miofile.c:69: error: `MIO_IN' undeclared
 (first use in this function)
 /usr/src/usr.bin/aucat/miofile.c:69: error: (Each undeclared
 identifier is reported only once
 /usr/src/usr.bin/aucat/miofile.c:69: error: for each function it
 appears in.)
 /usr/src/usr.bin/aucat/miofile.c:71: error: `MIO_OUT' undeclared
 (first use in this function)
 /usr/src/usr.bin/aucat/miofile.c:72: warning: implicit declaration
 of function `mio_open'
 /usr/src/usr.bin/aucat/miofile.c:72: warning: assignment makes
 pointer from integer without a cast
 /usr/src/usr.bin/aucat/miofile.c:75: warning: implicit declaration
 of function `mio_nfds'
 /usr/src/usr.bin/aucat/miofile.c:81: warning: implicit declaration
 of function `mio_close'
 /usr/src/usr.bin/aucat/miofile.c: In function `miofile_read':
 /usr/src/usr.bin/aucat/miofile.c:91: warning: implicit declaration
 of function `mio_read'
 /usr/src/usr.bin/aucat/miofile.c:94: warning: implicit declaration
 of function `mio_eof'
 /usr/src/usr.bin/aucat/miofile.c: In function `miofile_write':
 /usr/src/usr.bin/aucat/miofile.c:113: warning: implicit declaration
 of function `mio_write'
 /usr/src/usr.bin/aucat/miofile.c: In function `miofile_pollfd':
 /usr/src/usr.bin/aucat/miofile.c:137: warning: implicit declaration
 of function `mio_pollfd'
 /usr/src/usr.bin/aucat/miofile.c: In function `miofile_revents':
 /usr/src/usr.bin/aucat/miofile.c:143: warning: implicit declaration
 of function `mio_revents'
 /usr/src/usr.bin/aucat/miofile.c: In function `miofile_close':
 /usr/src/usr.bin/aucat/miofile.c:149: warning: `return' with a
 value, in function returning void
 *** Error code 1
 
 Stop in /usr/src/usr.bin/aucat (line 92 of /usr/share/mk/sys.mk).
 
 
 It's happening since yesterday.  I tried cvs up'ing the changes from
 this morning and starting over--cleaned up /usr/obj, then did make
 obj  make cleandir  make depend  make.  It's still failing.
 

it seems that /usr/include/sndio.h is not up to date. Does
the following help?

cd /usr/src/include
cvs update sndio.h
sudo make install

-- Alexandre



Re: usr.bin/aucat fails to build on sparc64 -current

2009-07-27 Thread Alexandre Ratchov
On Mon, Jul 27, 2009 at 07:57:58AM +0200, Alexandre Ratchov wrote:
 
 it seems that /usr/include/sndio.h is not up to date. Does
 the following help?
 
   cd /usr/src/include
   cvs update sndio.h
   sudo make install
  ^^^

it's ``sudo make includes'', of course

-- Alexandre



VMWare vSphere with OpenBSD and carp

2009-07-27 Thread Vadim Korschok
Hi all,

 Matthew Grooms mgro...@shrew.net 27.07.2009 00:00 
Vadim Korschok wrote:
 Hi Matthew,

 I've read about your comment on FreeBSD and carp with VMWare vSwitches in
Promiscuous Mode. We also get loop packets. I'm very new to OpenBSD and hope
you can help us. We performed a bootonly network installation of OpenBSD 4.5.
After some searching we can not find the ip_carp.c like you described in your
first posting.

 http://www.mail-archive.com/freebsd-...@freebsd.org/msg30498.html

 We're also missing the ip_ether.c file. Is it because I'm using a generic
kernel ? How can I patch carp to work in VMWare vSphere ? Maybe you can attach
me a diff file, because I don't know which should I use (ip_carp.c or/and
ip_ether.c) and what's the final patch. We have spent already some days to get
it working, I'm already despaired :)


Hi Vadim,

 I'm afraid I don't have an OpenBSD system to generate diffs or attempt a
 kernel re-compile with. The code that I modified appears to exist in the
 OpenBSD kernel ...

 http://www.openbsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_carp.c?rev=1.171

 Your best bet would be to contact one of the OpenBSD developers on one
 of their mailing lists, forward them the patch and ask if someone would
 be able to port it for you. I am attaching the most recent version since
 it includes additional locking and a sysctl conditional as suggested by
 one of network stack maintainers. I haven't tested the ip_ether patch
 authored by Ermal but it may work and be more acceptable to the code
 maintainers ( IE, easier to talk them into including the patch in the
 main source distribution ).

 Hope this helps and good luck,

 -Matthew

Thanks in Advance

Vadim Korschok

[demime 1.01d removed an attachment of type application/octet-stream which had 
a name of esx-carp.diff]



Re: VMWare vSphere with OpenBSD and carp

2009-07-27 Thread Vadim Korschok
The mailinglist script droped the attachment from Matthew (esx-carp.diff):

Index: ip_carp.c
===
RCS file: /home/ncvs/src/sys/netinet/ip_carp.c,v
retrieving revision 1.52.2.3
diff -u -r1.52.2.3 ip_carp.c
--- ip_carp.c   9 May 2009 00:35:38 -   1.52.2.3
+++ ip_carp.c   26 Jul 2009 16:53:24 -
@@ -143,6 +143,8 @@
 carp_opts[CARPCTL_LOG], 0, log bad carp packets);
 SYSCTL_INT(_net_inet_carp, CARPCTL_ARPBALANCE, arpbalance, CTLFLAG_RW,
 carp_opts[CARPCTL_ARPBALANCE], 0, balance arp responses);
+SYSCTL_INT(_net_inet_carp, CARPCTL_DROPECHOED, drop_echoed, CTLFLAG_RW,
+carp_opts[CARPCTL_DROPECHOED], 0, drop packets echoed to sender);
 SYSCTL_INT(_net_inet_carp, OID_AUTO, suppress_preempt, CTLFLAG_RD,
 carp_suppress_preempt, 0, Preemption is suppressed);

@@ -552,6 +554,28 @@
return;
}

+   /*
+* verify that the source address is not valid
+* for the interface it was received on. this
+* tends to happen with VMWare ESX vSwitches.
+*/
+   if (carp_opts[CARPCTL_DROPECHOED]) {
+   struct ifnet *ifp = m-m_pkthdr.rcvif;
+   struct ifaddr *ifa;
+   IF_ADDR_LOCK(ifp);
+   TAILQ_FOREACH(ifa, ifp-if_addrlist, ifa_list) {
+   struct in_addr in4;
+   in4 = ifatoia(ifa)-ia_addr.sin_addr;
+   if (ifa-ifa_addr-sa_family == AF_INET 
+   in4.s_addr == ip-ip_src.s_addr) {
+   m_freem(m);
+   IF_ADDR_UNLOCK(ifp);
+   return;
+   }
+   }
+   IF_ADDR_UNLOCK(ifp);
+   }
+
/* verify that the IP TTL is 255.  */
if (ip-ip_ttl != CARP_DFLTTL) {
carpstats.carps_badttl++;
@@ -644,6 +668,28 @@
return (IPPROTO_DONE);
}

+   /*
+* verify that the source address is not valid
+* for the interface it was received on. this
+* tends to happen with VMWare ESX vSwitches.
+*/
+   if (carp_opts[CARPCTL_DROPECHOED]) {
+   struct ifnet *ifp = m-m_pkthdr.rcvif;
+   struct ifaddr *ifa;
+   IF_ADDR_LOCK(ifp);
+   TAILQ_FOREACH(ifa, ifp-if_addrlist, ifa_list) {
+   struct in6_addr in6;
+   in6 = ifatoia6(ifa)-ia_addr.sin6_addr;
+   if (ifa-ifa_addr-sa_family == AF_INET6 
+   memcmp(in6, ip6-ip6_src, sizeof(in6)) == 0) {
+   m_freem(m);
+   IF_ADDR_UNLOCK(ifp);
+   return (IPPROTO_DONE);
+   }
+   }
+   IF_ADDR_UNLOCK(ifp);
+   }
+
/* verify that the IP TTL is 255 */
if (ip6-ip6_hlim != CARP_DFLTTL) {
carpstats.carps_badttl++;
Index: ip_carp.h
===
RCS file: /home/ncvs/src/sys/netinet/ip_carp.h,v
retrieving revision 1.3
diff -u -r1.3 ip_carp.h
--- ip_carp.h   1 Dec 2006 18:37:41 -   1.3
+++ ip_carp.h   26 Jul 2009 16:53:24 -
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/netinet/ip_carp.h,v 1.3 2006/12/01 18:37:41 imp Exp $
*/
+/* $FreeBSD: src/sys/netinet/ip_carp.h,v 1.3.8.1 2009/04/15 03:14:26 
kensmith
Exp $   */
 /* $OpenBSD: ip_carp.h,v 1.8 2004/07/29 22:12:15 mcbride Exp $ */

 /*
@@ -140,7 +140,8 @@
 #defineCARPCTL_LOG 3   /* log bad packets */
 #defineCARPCTL_STATS   4   /* statistics (read-only) */
 #defineCARPCTL_ARPBALANCE  5   /* balance arp responses */
-#defineCARPCTL_MAXID   6
+#defineCARPCTL_DROPECHOED  6   /* drop packets echoed to the 
sender */
+#defineCARPCTL_MAXID   7

 #defineCARPCTL_NAMES { \
{ 0, 0 }, \



Re: rplay dependency unsatisfied : cannot install

2009-07-27 Thread Stuart Henderson
On 2009-07-26, Josh Grosse j...@jggimi.homeip.net wrote:
 On Sun, Jul 26, 2009 at 11:38:25PM +0200, Jean-Fran?ois SIMON wrote:
 Hi,
 
 The following happens. gsm seems to have been removed due to liscence.
 Please let me know how to proceed ? I need audio with fvwm which rplay seems
 to be able to provide with minimal resources as in my case.

 At 4.5-release, the license to distribute gsm was unclear.  You can build it
 from the ports tree, as describe in FAQ 15.



the license was since clarified, so gsm packages are available for 4.6/-current.



Re: VMWare vSphere with OpenBSD and carp

2009-07-27 Thread Marco Pfatschbacher
Hmm,

are you sure this is happening with OpenBSD?
We solved that problem almost two years ago.
Dunno if FreeBSD merged any of these changes...

http://www.openbsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_carp.c?f=h#rev1.152


On Mon, Jul 27, 2009 at 09:09:27AM +0200, Vadim Korschok wrote:
 The mailinglist script droped the attachment from Matthew (esx-carp.diff):
 
 Index: ip_carp.c
 ===
 RCS file: /home/ncvs/src/sys/netinet/ip_carp.c,v
 retrieving revision 1.52.2.3
 diff -u -r1.52.2.3 ip_carp.c
 --- ip_carp.c 9 May 2009 00:35:38 -   1.52.2.3
 +++ ip_carp.c 26 Jul 2009 16:53:24 -
 @@ -143,6 +143,8 @@
  carp_opts[CARPCTL_LOG], 0, log bad carp packets);
  SYSCTL_INT(_net_inet_carp, CARPCTL_ARPBALANCE, arpbalance, CTLFLAG_RW,
  carp_opts[CARPCTL_ARPBALANCE], 0, balance arp responses);
 +SYSCTL_INT(_net_inet_carp, CARPCTL_DROPECHOED, drop_echoed, CTLFLAG_RW,
 +carp_opts[CARPCTL_DROPECHOED], 0, drop packets echoed to sender);
  SYSCTL_INT(_net_inet_carp, OID_AUTO, suppress_preempt, CTLFLAG_RD,
  carp_suppress_preempt, 0, Preemption is suppressed);
 
 @@ -552,6 +554,28 @@
   return;
   }
 
 + /*
 +  * verify that the source address is not valid
 +  * for the interface it was received on. this
 +  * tends to happen with VMWare ESX vSwitches.
 +  */
 + if (carp_opts[CARPCTL_DROPECHOED]) {
 + struct ifnet *ifp = m-m_pkthdr.rcvif;
 + struct ifaddr *ifa;
 + IF_ADDR_LOCK(ifp);
 + TAILQ_FOREACH(ifa, ifp-if_addrlist, ifa_list) {
 + struct in_addr in4;
 + in4 = ifatoia(ifa)-ia_addr.sin_addr;
 + if (ifa-ifa_addr-sa_family == AF_INET 
 + in4.s_addr == ip-ip_src.s_addr) {
 + m_freem(m);
 + IF_ADDR_UNLOCK(ifp);
 + return;
 + }
 + }
 + IF_ADDR_UNLOCK(ifp);
 + }
 +
   /* verify that the IP TTL is 255.  */
   if (ip-ip_ttl != CARP_DFLTTL) {
   carpstats.carps_badttl++;
 @@ -644,6 +668,28 @@
   return (IPPROTO_DONE);
   }
 
 + /*
 +  * verify that the source address is not valid
 +  * for the interface it was received on. this
 +  * tends to happen with VMWare ESX vSwitches.
 +  */
 + if (carp_opts[CARPCTL_DROPECHOED]) {
 + struct ifnet *ifp = m-m_pkthdr.rcvif;
 + struct ifaddr *ifa;
 + IF_ADDR_LOCK(ifp);
 + TAILQ_FOREACH(ifa, ifp-if_addrlist, ifa_list) {
 + struct in6_addr in6;
 + in6 = ifatoia6(ifa)-ia_addr.sin6_addr;
 + if (ifa-ifa_addr-sa_family == AF_INET6 
 + memcmp(in6, ip6-ip6_src, sizeof(in6)) == 0) {
 + m_freem(m);
 + IF_ADDR_UNLOCK(ifp);
 + return (IPPROTO_DONE);
 + }
 + }
 + IF_ADDR_UNLOCK(ifp);
 + }
 +
   /* verify that the IP TTL is 255 */
   if (ip6-ip6_hlim != CARP_DFLTTL) {
   carpstats.carps_badttl++;
 Index: ip_carp.h
 ===
 RCS file: /home/ncvs/src/sys/netinet/ip_carp.h,v
 retrieving revision 1.3
 diff -u -r1.3 ip_carp.h
 --- ip_carp.h 1 Dec 2006 18:37:41 -   1.3
 +++ ip_carp.h 26 Jul 2009 16:53:24 -
 @@ -1,4 +1,4 @@
 -/*   $FreeBSD: src/sys/netinet/ip_carp.h,v 1.3 2006/12/01 18:37:41 imp Exp $
 */
 +/*   $FreeBSD: src/sys/netinet/ip_carp.h,v 1.3.8.1 2009/04/15 03:14:26 
 kensmith
 Exp $ */
  /*   $OpenBSD: ip_carp.h,v 1.8 2004/07/29 22:12:15 mcbride Exp $ */
 
  /*
 @@ -140,7 +140,8 @@
  #define  CARPCTL_LOG 3   /* log bad packets */
  #define  CARPCTL_STATS   4   /* statistics (read-only) */
  #define  CARPCTL_ARPBALANCE  5   /* balance arp responses */
 -#define  CARPCTL_MAXID   6
 +#define  CARPCTL_DROPECHOED  6   /* drop packets echoed to the 
 sender */
 +#define  CARPCTL_MAXID   7
 
  #define  CARPCTL_NAMES { \
   { 0, 0 }, \



Re: usr.bin/aucat fails to build on sparc64 -current

2009-07-27 Thread Brian Keefer

On Jul 26, 2009, at 11:17 PM, Alexandre Ratchov wrote:


On Mon, Jul 27, 2009 at 07:57:58AM +0200, Alexandre Ratchov wrote:


it seems that /usr/include/sndio.h is not up to date. Does
the following help?

cd /usr/src/include
cvs update sndio.h
sudo make install

  ^^^

it's ``sudo make includes'', of course

-- Alexandre



Your off-list instructions (below) fixed it.  Thanks :)

cd /usr/src
cvs update include/sndio.h lib/libsndio usr.bin/aucat
cd /usr/src/include
make prereq  sudo make includes
cd /usr/src/lib/libsndio
make obj  make depend  make  sudo make install
cd /usr/src/usr.bin/aucat
make obj  make depend  make  sudo make install

--
bk



Re: man pages conflict or clarification for mount_vnd, newfs and man 5 disklabel

2009-07-27 Thread Jacob Yocom-Piatt
please stop jargonizing in an attempt to make yourself sound smart, it 
is painfully academic. your behavior reminds me of grad school misfits i 
have worked with who are convinced that being a pompous jerk is 
equivalent to being successful.


have some manners and don't send your retarded messages to so many 
lists. getting *4* of your emails each time you send one makes a solid 
case for you being the smartest person on-list to date.




Seminario de Habilidades Gerenciales. 3 de agosto, Montevideo.

2009-07-27 Thread EsAG Uruguay
Invitacisn

misc@openbsd.org



Seminario intensivo

Herramientas Gerenciales II

3 de agosto Hotel Ibis, Montevideo.

Las organizaciones estan inmersas actualmente en un proceso de grandes 
transformaciones originadas en diferentes partes del mundo, que ejercen un 
impacto directo sobre ellas. En este contexto, es indispensable que los mandos 
gerenciales sepan mejorar el desempeqo de su sector, area u organizacisn, para 
impulsar los cambios y responder a las presiones del medio en el cual se 
desarrollan.

Habilidades gerenciales a desarrollar:

- Inteligencia emocional

- Toma de decisiones

- Ticnicas de negociacisn

- Ronda de preguntas

Docentes:

Ing. Eustaquio Vera - Master en administracisn (Standford, California).

Pablo W. Dorrego - Master en liderazgo (Houston)

Otro docente a confirmar...

Solicite programa completo sin compromiso a: 

Telifono: (02) 314 1688

E-mail: esag.even...@ejecutivos.com 

 

CUPOS LIMITADOS

NO PIERDA SU LUGAR

 

ESAG ES UN CENTRO ESPECIALIZADO EN FORMACISN EJECUTIVA Y EMPRENDEDORA

CON MAS DE 1.000 PERSONAS CAPACITADAS CADA AQO, CON UN STAFF NACIONAL E 
INTERNACIONAL

Para solicitar baja de esta informacisn, envme un correo con el asunto BORRAR. 
Gracias y disculpe molestias.

[demime 1.01d removed an attachment of type image/jpeg which had a name of 
Esag05.jpg]



Re: VMWare vSphere with OpenBSD and carp

2009-07-27 Thread Vadim Korschok
 Marco Pfatschbacher m...@mailq.de 27.07.2009 11:35 
Hmm,

are you sure this is happening with OpenBSD?
We solved that problem almost two years ago.
Dunno if FreeBSD merged any of these changes...

 http://www.openbsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_carp.c?f=h#rev1.152

The patch from Matthew is working under FreeBSD, but after the installation
from FreeBSD we found out that load balancing / carpnodes are not supported.
So we can not test same scenario under FreeBSD. I've also tried to patch
OpenBSD without luck.

I've attached a picture: http://www.abload.de/image.php?img=carpicpb.jpg

fw0-ext:
--
em0: WAN
em1: inet 10.25.0.3 255.255.255.0 NONE

carp0:
inet 10.25.0.15 255.255.255.0 10.25.0.255 balancing ip carpnodes 1:100,2:0
pass password
!/sbin/route add 172.25.0.0/20 10.25.0.105

em2: pfsync0

fw1-ext:
--
em0: WAN
em1: inet 10.25.0.4 255.255.255.0 NONE

carp0: inet 10.25.0.5 255.255.255.0 10.25.0.255 balancing ip carpnodes
1:0,2:100 pass password
!/sbin/route add 172.25.0.0/20 10.25.0.105

em2: pfsync0

fw0-int:
--
em0: inet 10.25.0.103 255.255.255.0 NONE
em1: inet 172.25.0.3 255.255.240.0 NONE
em2: pfsync0
carp0: inet 10.25.0.105 255.255.255.0 10.25.0.255 balancing ip carpnodes
5:0,6:100 pass password
carp1 inet 172.25.0.5 255.255.240.0 172.25.15.255 balancing ip carpnodes
7:0,8:100 pass password

fw1-int:
--
em0: inet 10.25.0.104 255.255.255.0 NONE
em1: inet 172.25.0.4 255.255.240.0 NONE
em2: pfsync0
carp0: inet 10.25.0.105 255.255.255.0 10.25.0.255 balancing ip carpnodes
5:100,6:0 pass password
carp1 inet 172.25.0.5 255.255.240.0 172.25.15.255 balancing ip carpnodes
7:100,8:0 pass password

ping from dmz to lan: only requests (on lan site)
ping from lan to dmz: only reply's (on lan site)
ping from external firewalls to lan: only from one firewall not from both at
the same time

If we set the route route add 172.25.0.0/20 10.25.0.105 on em1 instead of
carp0, the clients will be flooded. 1 Ping =  ~ 8000 ICMP Requests.

So what is the problem here ?

 On Mon, Jul 27, 2009 at 09:09:27AM +0200, Vadim Korschok wrote:
 The mailinglist script droped the attachment from Matthew (esx-carp.diff):

 Index: ip_carp.c
 ===
 RCS file: /home/ncvs/src/sys/netinet/ip_carp.c,v
 retrieving revision 1.52.2.3
 diff -u -r1.52.2.3 ip_carp.c
 --- ip_carp.c 9 May 2009 00:35:38 -   1.52.2.3
 +++ ip_carp.c 26 Jul 2009 16:53:24 -
 @@ -143,6 +143,8 @@
  carp_opts[CARPCTL_LOG], 0, log bad carp packets);
  SYSCTL_INT(_net_inet_carp, CARPCTL_ARPBALANCE, arpbalance, CTLFLAG_RW,
  carp_opts[CARPCTL_ARPBALANCE], 0, balance arp responses);
 +SYSCTL_INT(_net_inet_carp, CARPCTL_DROPECHOED, drop_echoed, CTLFLAG_RW,
 +carp_opts[CARPCTL_DROPECHOED], 0, drop packets echoed to sender);
  SYSCTL_INT(_net_inet_carp, OID_AUTO, suppress_preempt, CTLFLAG_RD,
  carp_suppress_preempt, 0, Preemption is suppressed);

 @@ -552,6 +554,28 @@
   return;
   }

 + /*
 +  * verify that the source address is not valid
 +  * for the interface it was received on. this
 +  * tends to happen with VMWare ESX vSwitches.
 +  */
 + if (carp_opts[CARPCTL_DROPECHOED]) {
 + struct ifnet *ifp = m-m_pkthdr.rcvif;
 + struct ifaddr *ifa;
 + IF_ADDR_LOCK(ifp);
 + TAILQ_FOREACH(ifa, ifp-if_addrlist, ifa_list) {
 + struct in_addr in4;
 + in4 = ifatoia(ifa)-ia_addr.sin_addr;
 + if (ifa-ifa_addr-sa_family == AF_INET 
 + in4.s_addr == ip-ip_src.s_addr) {
 + m_freem(m);
 + IF_ADDR_UNLOCK(ifp);
 + return;
 + }
 + }
 + IF_ADDR_UNLOCK(ifp);
 + }
 +
   /* verify that the IP TTL is 255.  */
   if (ip-ip_ttl != CARP_DFLTTL) {
   carpstats.carps_badttl++;
 @@ -644,6 +668,28 @@
   return (IPPROTO_DONE);
   }

 + /*
 +  * verify that the source address is not valid
 +  * for the interface it was received on. this
 +  * tends to happen with VMWare ESX vSwitches.
 +  */
 + if (carp_opts[CARPCTL_DROPECHOED]) {
 + struct ifnet *ifp = m-m_pkthdr.rcvif;
 + struct ifaddr *ifa;
 + IF_ADDR_LOCK(ifp);
 + TAILQ_FOREACH(ifa, ifp-if_addrlist, ifa_list) {
 + struct in6_addr in6;
 + in6 = ifatoia6(ifa)-ia_addr.sin6_addr;
 + if (ifa-ifa_addr-sa_family == AF_INET6 
 + memcmp(in6, ip6-ip6_src, sizeof(in6)) == 0) {
 + m_freem(m);
 + IF_ADDR_UNLOCK(ifp);
 + return (IPPROTO_DONE);
 + }
 + }
 + IF_ADDR_UNLOCK(ifp);
 + }
 +
   /* verify that the 

Re: locale en_US.ASCII?

2009-07-27 Thread ropers
2009/7/27 Geoff g...@lib.oat.com:
 Is there a reason the en_US.ASCII locale is not available in
 the standard distribution?

Well, UTF-8 is backwards-compatible with US-ASCII. Or maybe when you
said US-ASCII you were really thinking of ye olde Code Page 437?
http://en.wikipedia.org/wiki/Code_page_437

That said, It is my understanding that Unicode support in OpenBSD
hasn't been completed yet (correct me if I'm wrong).

--ropers



Security Alert

2009-07-27 Thread Bank Of America�
Bank of

America Higher Standards

Customer

using a laptop for Online Banking

Online

Banking Alert

Remember:
Always look for your
SiteKey before you
Sign In ?

SiteKey Confirmation


Due to our recent upgrade of all online accounts,it is of utmost
necessity for all Bank of America customers to confirm their sitekey.This
is one of our varying methods of checking online fraud which seems to be
on the increase.

Please click on confirm SiteKey Now and reconfirm your complete account
details.This completes the verification process and ensures that you have
a safe and uninterrupted online usage of your account at all times.



Because your reply will not be transmitted via secure e-mail, the e-mail
address that generated this alert will not accept replies. If you would
like to contact Bank of America with questions or comments, please sign
in to Online Banking and visit the customer service section.



Official Sponsor 2004-2008 U.S. Olympic TeamsBank of America, N.A. Member
FDIC. Equal Housing Lender [IMAGE]
2009 Bank of America Corporation. All rights reserved



Re: man pages conflict or clarification for mount_vnd, newfs and man 5 disklabel

2009-07-27 Thread Marco Peereboom
 Perhaps, but I am not going to enter any 'p*issing contests' of who's
 got whose name where (besides, I am not implying to be an uber-coder,
 but I do reserve the right to express my opinion wrt matter at hand).
 I would like to retain the concentration on the matter discussed.

Your opinion is wrong and uninteresting.  The only thing you have
expressed so far is your detachment from the real world by implying that
some sort of retarded document written by committee retards is somehow
important.

 
  The source code _does_ define the behaviour.  Exactly.  Perhaps the
  source code is wrong, but it *EXACTLY DEFINES THE BEHAVIOUR*.
 
 All I was saying that it is not always the case. For example:
 
 the code in various http client/server applications *implements* the
 behavior (correctly or incorrectly as it may be), but the behavior is
 *defined* elsewhere (e.g. a standard);

And in the real world all these standards are treated as guidelines.
Anyone who has written code from a standard know this.  This also
means that every person on this planet would interpret language the
same.  In the open source world people can't even agree what the word
free means.

 
 similar things could be said about the code in c compiler vs the c
 standard et al.

Show me 2 compilers and I'll show you 2 compilers that don't adhere to
the spec.

 Sometimes this may not be the case, of course, but to categorically
 imply that 'code defines behavior' is not right in my opinion.

It does.  Code is absolute, words on paper are not.

 On the other hand -- perhaps we differ in our understanding of the
 term defines. You probably implying defines as in results in a
 given behavior, I am implying defines more in terms of
 standardization/documentation (i.e. outline/definition of
 rules/behavior).

blah blah blah.

 Either way -- this only reinforces what I was saying wrt to not
 expecting any future-compatible behavior of system and thus reducing
 the scope of disklabel and 'c' partition arguments to the
 static/current codebase behavior.

Compatible with what?  The c partition is the whole disk, end of
discussion.  Don't know what a committee could ever add to that.

In fact I do know; they'd attach some arbitrary rules to show how smart
they are or to push some corporation's agenda.  The last thing they'd do
is push anything useful.

BTW, don't believe me?  Go read ACPI, SCSI  IPMI specs.  Then go write
the code.  Let me know how that went.



Re: AMD 780/790GX Motherboards

2009-07-27 Thread Glenn
Hi,
 Can you elaborate on how make the second Audio device (azalia1) not azalia0
as the default audio device used for playback?
Thanks!
Glenn



 3) And lastly I disabled the useless azalia on the northbridge
 azalia0 at pci1 dev 5 function 1 ATI RS780 HD Audio rev 0x00: apic 4 int
 19 (irq 10)
 azalia0: invalid ADC PCM format: 0x
 azalia0: No codecs found
 so I got audio from the other azaila
 azalia1 at pci0 dev 20 function 2 ATI SBx00 HD Audio rev 0x00: apic 4 int
 16 (irq 7)
 azalia1: codecs: Realtek ALC888
 audio0 at azalia1



Re: Intel Mac mini Server Mode

2009-07-27 Thread Tasmanian Devil
 As detailed in the following message, it is possible to use a magic tweak
 to get the Mac mini into server mode.

 http://marc.info/?l=openbsd-miscm=120631459418290w=2

 This was accomplished with pcitweak which unfortunately no longer exists in
 X.Org. The only way to get it at this point is to install 4.3 upgrade to 4.4
 and then to 4.5. I have also tried using pciutils from ports but this does
 not work at all on an Intel Mac mini running OpenBSD 4.5. Is there any other
 solution that works on 4.5?

 I have searched the archives and every place else I can possible think of as
 well as the web at large. I haven't been able to find anything thus far. Any
 help would be greatly appreciated. I know there are others running Intel Mac
 minis and I hope someone has a solution. Thank you.

Yes, I saw pcitweak disappear, too, and I didn't see anything
regarding that on the lists. And no, I don't think you need to install
the whole OS to run pcitweak. You just need pcitweak and a few libs:

$ ldd /usr/X11R6/bin/pcitweak
/usr/X11R6/bin/pcitweak:
StartEnd  Type Open Ref GrpRef Name
1c00 3c005000 exe  10   0  /usr/X11R6/bin/pcitweak
07e05000 27e0d000 rlib 01   0  /usr/lib/libm.so.4.0
0efc 2eff5000 rlib 01   0  /usr/lib/libc.so.49.0
0e80 0e80 rtld 01   0  /usr/libexec/ld.so

I personally own a 4.3 (among others) CD set, so for me it's no
problem to extract the few files necessary to run pcitweak from the
CDs and add it to a new install by hand (wasn't necessary so far, I
always upgrade so far). Another option would be to download the old
release archives and extract the files from there, or you could get
the sources for pcitweak from the 4.3 source tree and compile it
yourself.

Tas.



sensorsd strange tokens values

2009-07-27 Thread Federico Giannici
I'm using for the first time sensorsd to monitor RAID controller status 
and motherboard temperature. A script of mine is called that sends me an 
email. System is OpenBSD 4.4 amd64.


The problem is the value of the %2 %3 and %4 tokens passed as arguments 
to the command. I thought that they should be (in the same order): 
current temperature, low limit and high limit as set in the 
sensorsd.conf file.


Indeed here are the values I get:

%2: 46.00
%3: degC
%4: 9223372036581.62

The command I use is command=/path/scriptname %x %n %l %2 %3 %4.

Is there some bug or I'm missing something?


Thanks.

--
___
__
   |-  giann...@neomedia.it
   |ederico Giannici  http://www.neomedia.it
___



Re: locale en_US.ASCII?

2009-07-27 Thread Geoff
From rop...@gmail.com  Mon Jul 27 10:07:03 2009
Received: from mail-fx0-f215.google.com (mail-fx0-f215.google.com 
[209.85.220.215])
by lib.oat.com (8.14.3/8.14.3) with ESMTP id n6RE6wFn018594
for g...@lib.oat.com; Mon, 27 Jul 2009 10:07:02 -0400 (EDT)
Received: by fxm11 with SMTP id 11so2735613fxm.18
for g...@lib.oat.com; Mon, 27 Jul 2009 07:06:52 -0700 (PDT)
Received: by 10.204.70.19 with SMTP id b19mr3168590bkj.62.1248703612472; Mon, 
27 Jul 2009 07:06:52 -0700 (PDT)
Subject: Re: locale en_US.ASCII?
To: Geoff g...@lib.oat.com
Cc: misc@openbsd.org

2009/7/27 Geoff g...@lib.oat.com:
 Is there a reason the en_US.ASCII locale is not available in
 the standard distribution?

on Mon, 27 Jul 2009 16:06:52 +0200 ropers rop...@gmail.com wrote:
Well, UTF-8 is backwards-compatible with US-ASCII. Or maybe when you
said US-ASCII you were really thinking of ye olde Code Page 437?
http://en.wikipedia.org/wiki/Code_page_437

No, I'm thinking about 0x20 (space) to 0x7E with upper
and lower case ABCDEFGHIJKLMNOPQRSTUVWXYZ, 0123456789,
and the US ASCII punctuation from 0x21 - 0x2F and 0x7B - 0x7E.
That is the common character set for keyboard input
and printable output across all the systems I use.
If all my keyboards, displays, and listing printers used a
consistent ISO8859-1 set (for example), there wouldn't be
much of a problem.

I need to be able to compose  edit text-like data for a
number of systems which use various character sets.
I need to be able to prepare that data in a consistent
manner logged into an OpenBSD system from these systems.

The printers and other specialized I/O devices
producing and consuming my data map 8-bit codes to glyphs
in different ways: mostly nonstandard or obscure.
Worse, many of them have multiple mappings available.

If I set the locale to C, most systems define
the characters from 0x7F-0xFF as not printable.
Editors, etc, print them as some sort of escaped or hex
representation which is consistent and I can enter the
values as hex or octal.  (n)VI, for instance, shows
characters as backslash  2 hex digits,
and inputs them as control-X  2 hex digits.

The problem is that UTF-8 is a superset of US-ASCII.
Various implementations differ incompatibly on how to handle the
characters not in US-ASCII, even when supposedly set to the
same locale:
   glyphs are missing from fonts
   glyphs are inconsistent from system to system
   characters are printed as (character-0x80)
   etc.
Input encoding from keyboards often also changes.

Since the OpenBSD default C locale defines many of the
characters 0x7F-0xFF as printable, my local systems attempt
to print the characters in ways that are often not visible
or readable.

I understand that many people don't have US-ASCII keyboards
or displays and find the limitation to that character set
a problem. Still, the ability to map character/byte/octet
values to and from visible marks in a completely consistent
manner is valuable to me and perhaps to other people as well.

That said, It is my understanding that Unicode support in OpenBSD
hasn't been completed yet (correct me if I'm wrong).

I don't believe it is there as well, since I haven't
seen wchar typed data in sources very often.

That's (selfishly) fine for me.
Living in a US-English environment shields me from a lot
of the need for conversion.

Unicode is an extremely unpleasant thing I'm avoiding until
the worth of the outcome exceeds the pain of conversion.
For instance, will the world settle on a compressed form
using the escape convention or will all data change to 16-bit?
Or both?

Legacy hardware, programs and data have a way of living forever.
Translation to and from Unicode will be with us for a
very long time even when the common systems and programs
are all Unicode-aware. :-( :-( :-(

geoff steckel



Re: AMD 780/790GX Motherboards

2009-07-27 Thread Owain Ainsworth
On Mon, Jul 27, 2009 at 11:57:09AM -0400, Glenn wrote:
 Hi,
  Can you elaborate on how make the second Audio device (azalia1) not azalia0
 as the default audio device used for playback?
 Thanks!
 Glenn

rm audio audioctl mixer sound
ln -s audio1 audio
ln -s audioctl1 audioctl
ln -s mixer1 mixer
ln -s sound1 sound

those symlinks default to 0, now they're set to those for audio1.

-0-
-- 
Love and scandal are the best sweeteners of tea.



Re: VMWare vSphere with OpenBSD and carp

2009-07-27 Thread Marco Pfatschbacher
On Mon, Jul 27, 2009 at 04:01:39PM +0200, Vadim Korschok wrote:
  Marco Pfatschbacher m...@mailq.de 27.07.2009 11:35 
 Hmm,
 
 are you sure this is happening with OpenBSD?
 We solved that problem almost two years ago.
 Dunno if FreeBSD merged any of these changes...
 
  http://www.openbsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_carp.c?f=h#rev1.152
   
 
 The patch from Matthew is working under FreeBSD, but after the installation 
 from FreeBSD we found out that load balancing / carpnodes are not supported. 
 So we can not test same scenario under FreeBSD. I've also tried to patch 
 OpenBSD without luck.

The patch is not necessary for OpenBSD. We already detect such a
loopback condition. So, to repeat my question: Are you seeing the same
problems as you had with FreeBSD under OpenBSD?

I don't know VMWare too well, but I remember that their multicast
handling was somehow funny.
I would start without using load balancing.
Only if everything works as expected without, you can try turning it on.

However, there's no guarantee that ``balancing ip'' will work
with that virtual vmware switch. But I'm too lazy to explain why :)
Carp IP-Balancing has some known limitations (which I really should've
added to the manpage): It was meant to balance servers, not pf(4)
firewalls. Although it works for pf(4), the performance you gain isn't
that high and there are issues if you're using any kind of NAT.
 
HTH,

Marco



Re: spamdb: is it my eyes or do TRAPPED addresses still manage to get through?

2009-07-27 Thread Bob Beck
Trapping an address only affects new connections that are looked up in 
the 
database. it does not affect existing passed connections.  spamd only updates 
the
tables on it's scan of the database so these will not take effect immediately.

-Bob


* Peter N. M. Hansteen pe...@bsdly.net [2009-07-24 07:10]:
 setting up a new spamd plus various content filtering at a client site
 we were kind of baffled to see that apparently manually setting an
 address to TRAPPED with spamdb, ie
 
 spamdb -a -t 211.49.57.32
 
 for some reason seems porous, in that messages received from that IP
 address still hits the content filter a few minutes after the manual
 intervention.  I just wonder what it is I'm seeing here - spamdb
 lookups cached or something? 
 
 - Peter
 
 -- 
 Peter N. M. Hansteen, member of the first RFC 1149 implementation team
 http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
 Remember to set the evil bit on all malicious network traffic
 delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
 

-- 
#!/usr/bin/perl
if ((not 0  not 1) !=  (! 0  ! 1)) {
   print Larry and Tom must smoke some really primo stuff...\n; 
}



Re: rplay dependency unsatisfied : cannot install

2009-07-27 Thread Jean-François SIMON
Thanks for your reply, however there is something I do not understand about
the below error. Are versions not compatible with each other ? the package
rplay was calling for gsm-1.0.10p0, I copied the only version available in
current which is gsm-1.0.13.tgz to the package directory (I am using OpenBSD
4.4) and got the following error :

$ sudo pkg add rplay-3.3.2p1.tgz
Unknown element: @sha /7zjWD2uDuusX4TGK8sIBcdDNPyA46d25a0e4eYopTU= in
SCALAR(0x885447ec),  at /usr/libdata/perl5/OpenBSD/PackingList.pm line 301,
$fh line 7.

Regards,
JF

2009/7/27 Stuart Henderson s...@spacehopper.org

 On 2009-07-26, Josh Grosse j...@jggimi.homeip.net wrote:
  On Sun, Jul 26, 2009 at 11:38:25PM +0200, Jean-Fran?ois SIMON wrote:
  Hi,
 
  The following happens. gsm seems to have been removed due to liscence.
  Please let me know how to proceed ? I need audio with fvwm which rplay
 seems
  to be able to provide with minimal resources as in my case.
 
  At 4.5-release, the license to distribute gsm was unclear.  You can build
 it
  from the ports tree, as describe in FAQ 15.
 
 

 the license was since clarified, so gsm packages are available for
 4.6/-current.



Re: rplay dependency unsatisfied : cannot install

2009-07-27 Thread Matthew Dempsky
2009/7/27 Jean-Frangois SIMON jfsimon1...@gmail.com:
 Thanks for your reply, however there is something I do not understand about
 the below error. Are versions not compatible with each other ? the package
 rplay was calling for gsm-1.0.10p0, I copied the only version available in
 current which is gsm-1.0.13.tgz to the package directory (I am using
OpenBSD
 4.4) and got the following error :

You're using -current packages on a 4.4 system.  That's not supported.

Your options are to either build the package from 4.4's ports tree or
to upgrade the base system to -current.



Re: rplay dependency unsatisfied : cannot install

2009-07-27 Thread Stuart Henderson
On 2009/07/27 19:33, Jean-Frangois SIMON wrote:
 Thanks for your reply, however there is something I do not understand about
 the below error. Are versions not compatible with each other ?

correct. you can't use a -current package on 4.4.



Re: sensorsd strange tokens values

2009-07-27 Thread Constantine A. Murenin
On 27/07/2009, Federico Giannici giann...@neomedia.it wrote:
 I'm using for the first time sensorsd to monitor RAID controller status and
 motherboard temperature. A script of mine is called that sends me an email.
 System is OpenBSD 4.4 amd64.

  The problem is the value of the %2 %3 and %4 tokens passed as arguments to
 the command. I thought that they should be (in the same order): current
 temperature, low limit and high limit as set in the sensorsd.conf file.

  Indeed here are the values I get:

  %2: 46.00
  %3: degC
  %4: 9223372036581.62

  The command I use is command=/path/scriptname %x %n %l %2 %3 %4.

  Is there some bug or I'm missing something?

%2 can never return 46.00 alone, what it must be returning is 46.00
degC.  Same goes for the rest of the tokens.

So perhaps the invocation of the script has to have some quotes around these.

C.



Požurite i odaberite nešto za sebe

2009-07-27 Thread Top Shop
PoE!tovani,

PodseDamo vas na specijalne letnje ponude, gde uz neverovatne popuste
moEete poruD
iti hit artikle za odmor, lepotu i zabavu! PoEurite i
odaberite neE!to za sebe, jer koliD
ine su ograniD
ene:

  * Hit trening holivudskih zvezda: Winsor Pilates set DVD -a sa popustom
od 62%

  * Poslednji put u ponudi: Proactiv Daily Oil krema za lice + POKLON

  * Paket zabave za decu i roditelje: Royal Classics i Starla sa 10%
popusta

  * Lagano D
iE!Denje uz senzorski sakupljaD
 praE!ine: Sweep'n'Vac uz
22% popusta

  * OdluD
ite se za 2 Sweet Dream jastuka i poruD
ite: Samo 995 RSD po
jastuku

  * Za viE!e samopouzdanja: Dorotea anticelulit kreme po paket ceni i uz
POKLON

  * Potpuno D
ist dom: pomoDu H2O paroD
istaD
a uz 1500 dinara uE!tede

PodseDamo Vas da ove cene vaEe samo do isteka zaliha!

Iskoristite ove super popuste, kliknite ovde!

VaE!,
E-Topshop

Ovu elektronsku poE!tu primate, ukoliko ste svojevoljno ostavili svoju
e-mail adresu, uD
estvovali u posebnim akcijama ili poklon igri na sajtu
www.e-topshop.tv

Ponuda data u ovom e-mailu vaEi iskljuD
ivo za porudEbine upuDene
putem Interneta ili broja telefona 021 489 26 60. Isporuku vrE!imo samo
na teritoriji Srbije.

Ukoliko ne Eelite viE!e da primate naE!e elektronske poruke, za
odjavljivanje sa naE!e e-mailing liste, kliknite ovde.

Studio Moderna d.o.o., Vojvode Stepe 30, 21000 Novi Sad, Tel: 021 489 26
60, Fax: 021 489 26 08, E-mail: i...@news.e-topshop.tv

[IMAGE]If you would no longer like to receive our emails please
unsubscribe by clicking here.



Re: Intel Mac mini Server Mode

2009-07-27 Thread Matthieu Herrb
On Mon, Jul 27, 2009 at 6:06 PM, Tasmanian
Deviltasm.de...@googlemail.com wrote:
 As detailed in the following message, it is possible to use a magic
tweak
 to get the Mac mini into server mode.

 http://marc.info/?l=openbsd-miscm=120631459418290w=2

 This was accomplished with pcitweak which unfortunately no longer exists
in
 X.Org. The only way to get it at this point is to install 4.3 upgrade to
4.4
 and then to 4.5. I have also tried using pciutils from ports but this does
 not work at all on an Intel Mac mini running OpenBSD 4.5. Is there any
other
 solution that works on 4.5?

 I have searched the archives and every place else I can possible think of
as
 well as the web at large. I haven't been able to find anything thus far.
Any
 help would be greatly appreciated. I know there are others running Intel
Mac
 minis and I hope someone has a solution. Thank you.

 Yes, I saw pcitweak disappear, too, and I didn't see anything
 regarding that on the lists. And no, I don't think you need to install
 the whole OS to run pcitweak. You just need pcitweak and a few libs:

 $ ldd /usr/X11R6/bin/pcitweak
 /usr/X11R6/bin/pcitweak:
StartEnd  Type Open Ref GrpRef Name
1c00 3c005000 exe  10   0  /usr/X11R6/bin/pcitweak
07e05000 27e0d000 rlib 01   0  /usr/lib/libm.so.4.0
0efc 2eff5000 rlib 01   0  /usr/lib/libc.so.49.0
0e80 0e80 rtld 01   0  /usr/libexec/ld.so

 I personally own a 4.3 (among others) CD set, so for me it's no
 problem to extract the few files necessary to run pcitweak from the
 CDs and add it to a new install by hand (wasn't necessary so far, I
 always upgrade so far). Another option would be to download the old
 release archives and extract the files from there, or you could get
 the sources for pcitweak from the 4.3 source tree and compile it
 yourself.

 Tas.



You can also write a small C program to do that.

--
Matthieu Herrb



ifstated with multiple CARP interfaces

2009-07-27 Thread Pascal Lalonde
Hello,

we have a problem with ifstated detecting state change on multiple CARP
interfaces.

After digging deeper, it seems that reading on the routing socket does
not give us all the state changes that we'd expect. We tried with the
latest snapshot kernel and got the same behavior.

Our CARP interfaces are as follows:
carp0
carp1
carp1010 (VLAN on carp1)
carp1011 (Another VLAN on carp1)
carp2
carp3

The condition we'd like to test is:
carp_up = 'carp0.link.up \
 carp1.link.up \
 carp1010.link.up \
 carp1011.link.up \
 carp2.link.up \
 carp3.link.up'

Doing a little check using a quick C program (see below), and playing
with the demote counter, we can clearly see why the condition is not
always met as it should:

# ./getifinfo 
[1] 20942
# ifconfig -g carp carpdemote 50
carp0 - LINK_STATE_DOWN
carp2 - LINK_STATE_DOWN
carp3 - LINK_STATE_DOWN
carp1010 - LINK_STATE_DOWN
carp1011 - LINK_STATE_DOWN
# ifconfig -g carp -carpdemote 50
carp1 - LINK_STATE_UP
carp1010 - LINK_STATE_UP
carp0 - LINK_STATE_UP
carp2 - LINK_STATE_UP
carp1011 - LINK_STATE_UP
carp3 - LINK_STATE_UP
# ifconfig -g carp carpdemote 50
carp0 - LINK_STATE_DOWN
carp1 - LINK_STATE_DOWN
carp2 - LINK_STATE_DOWN
carp3 - LINK_STATE_DOWN
carp1010 - LINK_STATE_DOWN
# ifconfig -g carp -carpdemote 50
carp0 - LINK_STATE_UP
carp1 - LINK_STATE_UP
carp1010 - LINK_STATE_UP
carp1011 - LINK_STATE_UP
# 

Question is, is it normal that the routing socket doesn't report all
changes? Anyone else having similar issues?

Thanks in advance,
--
Pascal


getifinfo.c:

#include sys/types.h
#include sys/socket.h
#include net/if.h
#include net/route.h
#include ifaddrs.h
#include unistd.h
#include stdio.h
#include string.h
#include err.h

char *if_states[] = {
LINK_STATE_UNKNOWN,
LINK_STATE_DOWN,
LINK_STATE_UP,
LINK_STATE_HALF_DUPLEX,
LINK_STATE_FULL_DUPLEX
};

int
main(int argc, char **argv)
{
int  rt_fd;
char msg[2048];
struct ifaddrs  *ifap, *ifa;
struct rt_msghdr*rtm = (struct rt_msghdr *)msg;
struct if_msghdr*ifm = (struct if_msghdr *)msg;
int  len;
char ifs[64][16];

if (getifaddrs(ifap))
err(1, getifaddrs);

for (ifa = ifap; ifa-ifa_next != NULL; ifa = ifa-ifa_next) {
strlcpy(ifs[if_nametoindex(ifa-ifa_name)], ifa-ifa_name, 16);
}

freeifaddrs(ifap);

if ((rt_fd = socket(PF_ROUTE, SOCK_RAW, 0))  0)
err(1, no routing socket);

while ((len = read(rt_fd, msg, sizeof(msg {
if (len  sizeof(struct rt_msghdr)) {
warnx(len  sizeof(struct rt_msghdr));
continue;
}

if (rtm-rtm_version != RTM_VERSION)
continue;

if (rtm-rtm_type != RTM_IFINFO)
continue;

printf(%s - %s\n, ifs[ifm-ifm_index],
if_states[ifm-ifm_data.ifi_link_state]);
}
return 0;
}



Scand HTTP traffic in mi openBSD

2009-07-27 Thread Yamidt Henao
Hello,

in CLAMav  witch the configuration if I just want to scan the HTTP traffic
in mi openbsd.

Best regards,
Y.H



Re: locale en_US.ASCII?

2009-07-27 Thread ropers
2009/7/27 Geoff g...@lib.oat.com:
 No, I'm thinking about 0x20 (space) to 0x7E with upper
 and lower case ABCDEFGHIJKLMNOPQRSTUVWXYZ, 0123456789,
 and the US ASCII punctuation from 0x21 - 0x2F and 0x7B - 0x7E.
 That is the common character set for keyboard input
 and printable output across all the systems I use.

 I understand that many people don't have US-ASCII keyboards
 or displays and find the limitation to that character set
 a problem. Still, the ability to map character/byte/octet
 values to and from visible marks in a completely consistent
 manner is valuable to me and perhaps to other people as well.

 Unicode is an extremely unpleasant thing I'm avoiding until
 the worth of the outcome exceeds the pain of conversion.
 For instance, will the world settle on a compressed form
 using the escape convention or will all data change to 16-bit?
 Or both?

Read this: http://en.wikipedia.org/wiki/UTF-8#Description

UTF-8 is 8 bit for the US-ASCII-compatible characters. Anything beyond
that, it's 2, 3, 4 byte per character. But as long as that upmost bit
is zero, you're looking at a completely US-ASCII compatible single
byte character. The 16+ bit characters only start where that upmost
bit is no longer zero.

Btw., in the first table currently shown at that link (have I talked
about this before?), the underlined parts in the example cells are
just to illustrate which parts of the hexadecimal Unicode code points
correspond to which bits in the binary representation on the following
line.

But this is probably getting OT, because AFAIK UTF-8 support isn't in
OpenBSD yet...

regards,
--ropers



bsd.rd question regarding user space multithreaded program

2009-07-27 Thread Jeremy Chase
With the MP kernel, if a process has multiple threads are they
constrained to run on one core?

Thanks
Jeremy

--
Jeremy Chase, N1JER
631.657.4210
http://weatherfinder.info/



4X1 Todo Incluido, Melia Cozumel

2009-07-27 Thread Melia Cozumel
En caso de no poder ver correctamente este correo favor de dar clic aqum

Al reservar y mencionar este @mail obtendras
10% de descuento adicional

Melia Cozumel All Inclusive Golf  Beach Resort
Carretera Costera Norte Km. 5,8 Cozumel - Quintana Roo MIXICO 77600
 
www.solmelia.com01 800 002 6986

Tel.   987 872 9891
Fax:  987 872 9899
E-mail:
 melia.cozu...@solmelia.com
reservaciones.melia.cozu...@solmelia.com
Este mensaje fue enviado para informacisn de nuestras promociones.  No 
pretendemos saturar su correo ni causarle molestias. Este mensaje de correo 
electrsnico no se considera SPAM, ya que cumple con lo establecido en el 
capmtulo VIII BIS de los lineamientos sobre comercio electrsnico publicados por 
la PROFECO, ademas de contener instrucciones y una forma electrsnica para 
notificar y solicitar la cancelacisn de su envmo y no continuar recibiindolo.   
  Si no desea recibir en un futuro estos mensajes favor de hacer clic en ( 
unsuscr...@pqstravel.com ) y sera removido de nuestra lista en 72 horas.  Si 
desea hacer llegar esta informacisn a otros agentes de viajes o particular,  
proporcisnenos sus direccisn de correo electrsnico HAGA CLIC AQUM  o envme sus 
sugerencias. Si desea informacisn sobre nuestros servios, contactenos a 
m...@pqstravel.com



Re: Colors and layout behaviour in tmux

2009-07-27 Thread Daniel Bolgheroni
On Fri, 24 Jul 2009, Nicholas Marriott wrote:

 Hi
 
  I'm trying to get colors right in tmux and just updated to the latest 
  snapshot to see if I get it running.
  
  Ways I'm trying to initialize tmux:
  
  $ TERM=screen tmux
  $ TERM=screen tmux -2
  $ TERM=screen tmux -8
  $ TERM=screen tmux -d
 
 Unless you are running tmux inside screen, you should not use TERM=screen
 outside.
 
 You should have TERM=screen /inside/ tmux. tmux will set that itself but you
 should be careful not to change it in shell startup files.

Probably I missed this. What's the recommended TERM entry to use with 
tmux? Now I am running with

$ TERM=color_xterm tmux -2

  Actually this problem appears specifically when running alpine. When in 
  tmux, I can just see one or one or two colors. No problem in mc. Is this e
 
 By default, it appears alpine has colours disabled. Can you go to the colour
 menu (S then K), and make sure the color style is set to use-termdef?

Actually, I didn't realize this. As I said above, I'm running with the 
-2 parameter. I was using the force-ansi-16color (not use-termdef) with 
screen, but changed to force-xterm-256color. Working fine now.
 
  Speaking of layouts, it seems that some commands which work inside tmux 
  can't be used in ~/.tmux.conf:
  
  I'm trying this in ~/.tmux.conf:
  
  select-layout main-vertical
  
  I get this:
  
  /home/dbolgheroni/.tmux.conf: can't establish current session at line 3
 
 You are trying to set the layout before any sessions have been created, see
 below.
 
  No problem if I comment this line.
  
  If I use something like new-window in conf file, tmux doesn't get 
  started, nor an error message shows up.
 
 This is probably due to a bug I have fixed earlier today (cmd.c r1.9).
 
 Even with this fix, you will not be able to use new-window/select-layout in 
 the
 configuration file without creating a session first.

 The usual way to create initial windows in the configuration file is to have
 something like:
 
 # create new session with emacs in window 0
 new emacs
 # create some more windows
 neww top
 neww
 # split the previous window and set its layout
 splitw
 splitw
 selectl even-vertical
 
 Then start the tmux server with tmux attach (or tmux start).
 
 If you start it with tmux new, tmux will load the configuration file -
 creating the session and windows with the commands in it - then create the
 second new session requested by the new command on the command line. I'd 
 like
 to make this a bit more obvious but so far I haven't thought of a good
 solution.

Will try with the latest snapshot.
 
  Also, when in tmux, I can't have the behaviour expected by main-vertical 
  unless I already splitted window. Is this normal?
 
 I don't understand what you mean. None of the layouts can do anything unless
 you have multiple panes already. If you want to force a window to take up only
 part of the full terminal size, you can use the force-width and force-height
 options.

I was expecting that _if I split_, it will act as main-vertical. Yes, 
I'm using force-width option.

Thank you.

--
Daniel Bolgheroni
FEI - Faculdade de Engenharia Industrial
http://www.dbolgheroni.eng.br/mykey

ASCII ribbon campaign ( )
 against HTML e-mail   X
  / \



Re: bsd.rd question regarding user space multithreaded program

2009-07-27 Thread Евгений Юнак
2009/7/28 Jeremy Chase jeremych...@gmail.com:
 With the MP kernel, if a process has multiple threads are they
 constrained to run on one core?

no.

-- 
The best the little guy can do is what
the little guy does right



Re: man pages conflict or clarification for mount_vnd, newfs and man 5 disklabel

2009-07-27 Thread leon zadorin
On 7/28/09, Marco Peereboom sl...@peereboom.us wrote:
 Perhaps, but I am not going to enter any 'p*issing contests' of who's
 got whose name where (besides, I am not implying to be an uber-coder,
 but I do reserve the right to express my opinion wrt matter at hand).
 I would like to retain the concentration on the matter discussed.

 Your opinion is wrong and uninteresting.  The only thing you have
 expressed so far is your detachment from the real world by implying that
 some sort of retarded document written by committee retards is somehow
 important.


I didn't say this (although I also did not express any support for
having this general attitude towards standards as 'retarded documents
written by retards'). I think your (and others) emotions are getting
in a way of seeing the point I was making.

I am not imposing a qualitative resolution that everything which is
concerned with source code implementation must be standardized by a
committee.

You appear to have concluded that I am frowning at the fact that some
parts of the source code are somehow not committee-standardized --
this is not so.

I am simply noting (i.e. observing w/o blaming-others or anything of
such sort) that, in the absence of such (or similar) standards, any
consideration for what kernel's mood may bring in a future (e.g.
arbitrary changes of interpretation of what entire physical disk
equates to; ala forward-compatibility) are not sufficient for the
arguments at hand.

In fact, I am not even suggesting that someone had made such
arguments, I was simply enumerating the reasons I thought were
relevant (and rather are easy to agree-on) when considering as to what
kernel's mood may be interpreted in the context of the originally
raised question (e.g. man pages implications for the disk to be
functional without any disklabel being written to it [man 5
disklabel], the reasons given for not using c partition in [man
vnconfig, caveats section] et al -- as per original email).


  The source code _does_ define the behaviour.  Exactly.  Perhaps the
  source code is wrong, but it *EXACTLY DEFINES THE BEHAVIOUR*.

 All I was saying that it is not always the case. For example:

 the code in various http client/server applications *implements* the
 behavior (correctly or incorrectly as it may be), but the behavior is
 *defined* elsewhere (e.g. a standard);

 And in the real world all these standards are treated as guidelines.

Sure. But if such guidelines do exist -- should one not, at the very
least, attempt/strive towards meeting them (provided, of course, that
the standard/guidelines have been accepted by the implementing
community)?

We are basically starting to enter the whole discussion of viewing
what implementation vs definition mean and this was so not the
point of the original question.

Besides, I am sure you already realize, that just because one may not
be implementing the standard correctly -- it does not mean that one
should simply ignore the standard altogether.

 Anyone who has written code from a standard know this.  This also
 means that every person on this planet would interpret language the
 same.  In the open source world people can't even agree what the word
 free means.


Not every person on this planet may interpret the language the same --
but this does not mean that everyone should abandon well-defined
semantics attached to well-known words and start speaking their own
non-interoperable junk. This is even more so w.r.t.
technical/programming languages.


 similar things could be said about the code in c compiler vs the c
 standard et al.

 Show me 2 compilers and I'll show you 2 compilers that don't adhere to
 the spec.

This is a bit of a moot point -- and I am sure you realize this
yourself. Not adhering to the specs does not equate to ignoring them
altogether.

 Sometimes this may not be the case, of course, but to categorically
 imply that 'code defines behavior' is not right in my opinion.

 It does.  Code is absolute, words on paper are not.

How you choose to represent the behavior's definition is irrelevant
(code or words, on paper or on screen).

I am, at this stage of conversation (if one can call it such), noting
the difference (in my opinion) between implementation and definition
-- and whilst there are cases when code represents both of such
concepts in one place; there are other places when there simply *must*
be multiple implementations (i.e. a source code of a given
app/library) of a given behavior/interface (standard) so that
different processes/boxes/entities/etc can inter-operate with each
other.

For instance: Hello, how are you? whether being written by me or by
you, on screen or on paper is still better than AOAURRAOREAr naoe
as10 ao ... right?

 On the other hand -- perhaps we differ in our understanding of the
 term defines. You probably implying defines as in results in a
 given behavior, I am implying defines more in terms of
 standardization/documentation (i.e. outline/definition of
 

Re: bsd.rd question regarding user space multithreaded program

2009-07-27 Thread Philip Guenther
On Monday, July 27, 2009, Jeremy Chase jeremych...@gmail.com wrote:
 With the MP kernel, if a process has multiple threads are they
 constrained to run on one core?

With the the supplied user-space libpthread, yes.  To do otherwise
requires building a kernel with the RTHREADS option and using
librthread as the threading library.  There are still a number of bugs
and limitations with rthreads however, so I would avoid using them
with any data or programs you can't recreate or check for consistency.
 (Bad errno handling means error conditions may be mishandled.  I
really need to finish porting the infrastructure for the fix to all
the architectures...)

Philip Guenther



Re: man pages conflict or clarification for mount_vnd, newfs and man 5 disklabel

2009-07-27 Thread Jacob Yocom-Piatt

leon zadorin wrote:
i am the smartest person in the room and have no respect for people 
who are obviously much more talented and accomplished than i. it is my 
life's work to make mountains out of minutae, bear witness to my 
steaming pile of awesomeness.



stop posting this on tech@ plz, it's *too* awesome.



Re: man pages conflict or clarification for mount_vnd, newfs and man 5 disklabel

2009-07-27 Thread leon zadorin
On 7/28/09, leon zadorin leonleo...@gmail.com wrote:
 How you choose to represent the behavior's definition is irrelevant
 (code or words, on paper or on screen).

 I am, at this stage of conversation (if one can call it such), noting
 the difference (in my opinion) between implementation and definition
 -- and whilst there are cases when code represents both of such
 concepts in one place; there are other places when there simply *must*
 be multiple implementations (i.e. a source code of a given
 app/library) of a given behavior/interface (standard) so that
 different processes/boxes/entities/etc can inter-operate with each
 other.

 For instance: Hello, how are you? whether being written by me or by
 you, on screen or on paper is still better than AOAURRAOREAr naoe
 as10 ao ... right?

I was, originally, a little hesitant of adding this extra note but
after some thought I might as well mention it... as it may provide
more clarity on the issue of this implementation vs definition
diversion from original question. This is only to show that, in fact,
I think we are saying common things, just in different terms.

I look at the actual ('raw') source code.

I then observe/derive a resulting behavior that such code would produce.

But I then also may want to optimize/improve the code (i.e. change it
with purposes of making the application perform better, faster, etc.)
-- but the question is: by changing the code, some (insignificant)
aspects of the resulting behavior may change as well -- so which parts
of the resulting behavior are relied-upon/are-expected by other
applications and which fall in the 'irrelevant/insignificant or,
indeed, undefined' category? One would need to know the boundaries of
code re-factoring when improving the *implementation* whilst still
retaining the interoperability-enabling interface/contract,
expected/*defined* behavior.

Whether such expectations (behavior definitions) are sometimes written
'inline' in the source code or in some standard publication is not the
main point really.

That's all I am saying. Feel free to ignore or make blah blah blah noises :-)

So now we can, perhaps, get back (if at all) to the man pages and what
they are implying wrt original question.

Leon.



Re: Colors and layout behaviour in tmux

2009-07-27 Thread Nicholas Marriott
  Unless you are running tmux inside screen, you should not use TERM=screen
  outside.
  
  You should have TERM=screen /inside/ tmux. tmux will set that itself but you
  should be careful not to change it in shell startup files.
 
 Probably I missed this. What's the recommended TERM entry to use with 
 tmux? Now I am running with
 
 $ TERM=color_xterm tmux -2

It should match your terminal. For xterm, I use xterm-xfree86 but xterm-color
or color_xterm are fine if they work for you. If you are using a 256-color
xterm, xterm-256color is probably the best (you won't need -2 in that case).

   Also, when in tmux, I can't have the behaviour expected by main-vertical 
   unless I already splitted window. Is this normal?
  
  I don't understand what you mean. None of the layouts can do anything unless
  you have multiple panes already. If you want to force a window to take up 
  only
  part of the full terminal size, you can use the force-width and force-height
  options.
 
 I was expecting that _if I split_, it will act as main-vertical. Yes, 
 I'm using force-width option.

Layouts are now applied once when you ask for them, the way to have one
automatically applied after you split is to bind it to your split key as well:

bind '' splitw\; selectl main-vertical

Regards

Nicholas