Hola tech Compilado De Documentales No Te Lo Pierdas ref.zsro

2012-01-29 Thread Pack Documentales Imperdibles
National Geographic Pack 15 DVDs Documentales
Primer Gran Compilado de los Mejores Documentales del Mundo de National
Geographic
en formato DVD real de alta resolucion de imaen y sonido / Apto DVD TV y
Tambien PC !!

Entre A La Web Principal Y Vea Mayores Detalles
Enlace alternativo clic aqui

Para ser eliminado de nuestras listas: Suprimir su correo del boletin
clic aqui



patch - RFC 4638 increased MTU support for pppoe(8) w/ ppp(8)

2012-01-29 Thread Ben Gould

Hi All,

The following is tested with:

Stock 5.0 as client  server.
These modification to 5.0 client  server.
Recent pppoe(4) patches for RFC 4638 support applied to 5.0 as the client.

It appears to be broken in with -current from a few days ago + these 
mods as the server; although if I run ktrace on the server's spawned 
ppp(8) then it appears to work just after the ktrace attaches...


To test pppoe(8) changes I use the following configuration files:

/etc/ppp/ppp.secret:
user1 secret123

/etc/ppp/ppp.conf:
default:
 set log Phase Chat LCP IPCP CCP tun command
 disable ipv6cp

pppoe1:
 set device !/usr/sbin/pppoe -i em1
 set mtu max 1492
 set mru max 1492
 set speed sync
 disable acfcomp protocomp
 deny acfcomp
 set authname user1
 set authkey secret123

pppoe2:
 set device !/usr/sbin/pppoe -i em1 -m 1500
 set mtu max 1500
 set mru max 1500
 set speed sync
 disable acfcomp protocomp
 deny acfcomp
 set authname user1
 set authkey secret123

pppoes1:
 set mtu max 1492
 set mru max 1492
 set speed sync
 disable acfcomp protocomp
 deny acfcomp
 set ifaddr 10.0.0.1 10.0.1.1-10.255.255.254 255.255.255.255
 enable pap

pppoes2:
 set mtu max 1500
 set mru max 1500
 set speed sync
 disable acfcomp protocomp
 deny acfcomp
 set ifaddr 10.0.0.1 10.0.1.1-10.255.255.254 255.255.255.255
 enable pap


And, for example, I will bring em1 up on the client and server with:
# ifconfig em1 mtu 2000 up

then go through the various combinations of
server# pppoe -p pppoes1 -i em1 -s
client# ppp pppoe1
ppp open
...

and
server# pppoe -p pppoes2 -i em1 -m 1500 -s
client# ppp pppoe2
ppp open
...


For testing the recent pppoe(4) modifications as the client I used:
# ifconfig em1 mtu 1500 up
# ifconfig pppoe0 0.0.0.0 0.0.0.1 netmask 255.255.255.255 \
pppoedev em1 authproto pap authname user1 authkey secret123

and subsequently:
# ifconfig em1 mtu 1508 up
# ifconfig pppoe0 down
# ifconfig pppoe0 mtu 1500 up

with both:
server# pppoe -p pppoes1 -i em1 -s
and
server# pppoe -p pppoes2 -i em1 -m 1500 -s

-- ben


Index: client.c
===
RCS file: /cvs/src/usr.sbin/pppoe/client.c,v
retrieving revision 1.23
diff -u -p -r1.23 client.c
--- client.c4 Jul 2011 16:29:35 -   1.23
+++ client.c29 Jan 2012 13:59:40 -
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.23 2011/07/04 16:29:35 sthen Exp $   */
+/* $OpenBSD: client.c,v 1.24 2011/11/05 09:20:36 yasuoka Exp $ */

 /*
  * Copyright (c) 2000 Network Security Technologies, Inc. 
http://www.netsec.net

@@ -28,10 +28,7 @@
 #include stdio.h
 #include sys/types.h
 #include sys/uio.h
-#include sys/time.h
 #include sys/socket.h
-#include sys/ioctl.h
-#include sys/param.h
 #include net/if.h
 #include net/if_dl.h
 #include net/if_types.h
@@ -41,10 +38,7 @@
 #include net/ppp_defs.h
 #include errno.h
 #include string.h
-#include err.h
-#include fcntl.h
 #include unistd.h
-#include sysexits.h
 #include stdlib.h
 #include signal.h

@@ -56,6 +50,7 @@

 u_int32_t client_cookie;
 u_int16_t client_sessionid;
+u_int16_t client_mtu;
 int pppfd, client_state;

 static int getpackets(int, u_int8_t *, u_int8_t *, struct ether_addr *,
@@ -86,6 +81,7 @@ client_mode(int bfd, u_int8_t *sysname,
pppfd = -1;
client_sessionid = 0x;
client_state = -1;
+   client_mtu = 0;

r = send_padi(bfd, myea, srvname);
if (r = 0)
@@ -150,13 +146,14 @@ client_mode(int bfd, u_int8_t *sysname,
 static int
 send_padi(int fd, struct ether_addr *ea, u_int8_t *srv)
 {
-   struct iovec iov[10];
+   struct iovec iov[12];
struct pppoe_header ph = {
PPPOE_VERTYPE(1, 1),
PPPOE_CODE_PADI, 0, 0
};
-   struct pppoe_tag thost, tserv;
+   struct pppoe_tag thost, tserv, tmaxpayload;
u_int16_t etype = htons(ETHERTYPE_PPPOEDISC);
+   u_int16_t maxpayload;
int i = 0;

/* ether_header */
@@ -196,6 +193,21 @@ send_padi(int fd, struct ether_addr *ea,
}
tserv.len = htons(tserv.len);

+   /* ppp-max-payload tag (optional) */
+   if (rfc_4638_mtu  PPPOE_MIN_MTU) {
+   tmaxpayload.type = htons(PPPOE_TAG_PPP_MAX_PAYLOAD);
+   tmaxpayload.len = htons(sizeof(maxpayload));
+   tmaxpayload.val = (u_int8_t*) maxpayload;
+   maxpayload = htons(rfc_4638_mtu);
+   iov[i].iov_base = tmaxpayload;
+   iov[i++].iov_len = sizeof(tmaxpayload.len) + 
sizeof(tmaxpayload.type);
+   iov[i].iov_base = maxpayload;
+   iov[i++].iov_len = sizeof(maxpayload);
+   ph.len += sizeof(tmaxpayload.len) + sizeof(tmaxpayload.type) +
+sizeof(maxpayload);
+   }
+
+
ph.len = htons(ph.len);

client_state = STATE_EXPECT_PADO;
@@ -208,9 +220,10 @@ send_padr(int bfd, u_int8_t *srv, struct
 struct ether_addr *rmea, struct ether_header *eh,
 struct pppoe_header *ph, struct tag_list *tl)
 {
-   struct iovec 

Re: tcpbench: Don't use floating precision while printing PPS in UDP mode.

2012-01-29 Thread Lawrence Teo
On Sun, Jan 29, 2012 at 12:55:56AM -0200, Christiano F. Haesbaert wrote:
 Moin, 
 
 I think it doesn't make sense for PPS, also, the rounding is wrong so we 
 always get .000
 
 This makes the output go from:
 Elapsed:   11685 Mbps:  63.602 Peak Mbps:  63.602 Rx PPS:   
 5401.000
 
 to:
 Elapsed:   15000 Mbps:1227.177 Peak Mbps:1245.347 Tx PPS:  104210
 
 ok ?

I tested your diff and the new output makes a lot of sense to me. Easier
for scripts to parse too. :)

I obviously can't ok it but I like it. :)

Thanks,
Lawrence



Re: Apache's FAQ.html

2012-01-29 Thread Jason McIntyre
On Fri, Jan 27, 2012 at 06:44:10PM +, Mikolaj Kucharski wrote:
 On Fri, Jan 27, 2012 at 08:42:08AM +, Jason McIntyre wrote:
  hmm. there are more problems than this:
  
  - some of the pages in htdocs refer to a FAQ page at
http://httpd.apache.org/docs/misc/FAQ.html. the link doesn;t work
though.
  
  - misc/index.html refers to FAQ.html, the file you propose to remove.
  
  your intention seems correct though (i agree misc/FAQ.html looks
  broken).
  
  the reference in misc/index.html can be trivially fixed. i've no idea
  about the apache link though.
  
  jmc
 
 
 I would also change link in ssl faq too:
 
 Index: mod/mod_ssl/ssl_faq.html
 ===
 RCS file: /cvs/src/usr.sbin/httpd/htdocs/manual/mod/mod_ssl/ssl_faq.html,v
 retrieving revision 1.12
 diff -u -r1.12 ssl_faq.html
 --- mod/mod_ssl/ssl_faq.html  18 Jun 2008 05:42:29 -  1.12
 +++ mod/mod_ssl/ssl_faq.html  27 Jan 2012 18:34:58 -
 @@ -500,7 +500,7 @@
  are done with full year value instead of abbreviating to two digits.
  p
  Additionally according to a a
 -href=http://www.apache.org/docs/misc/FAQ.html#year2000;Year 2000
 +href=../../misc/FAQ.html#year2000Year 2000
  statement/a from the Apache Group, the Apache webserver is Year 2000
  compliant, too. But whether OpenSSL or the underlaying Operating System
  (either a Unix or Win32 platform) is Year 2000 compliant is a different
 
 
 
 
 Looking at latest online FAQ for Apache 1.3 it looks even worse than
 in-tree manual/FAQ.html
 
 http://httpd.apache.org/docs/1.3/misc/FAQ.html
 
 so I'm also not sure what's the option here.
 
 -- 
 best regards
 q#
 

my point about misc/index.html was incorrect. not to worry...

i've committed your suggestion to moving FAQ.html to misc/, and updated
the link in ssl_faq.html.

when i have time, i'll look at what we can do with the broken links. of
course, if someone beats me to it i won't be in any way offended.

jmc



Re: Apache's FAQ.html

2012-01-29 Thread Jason McIntyre
On Sun, Jan 29, 2012 at 01:56:14AM +0200, Rares Aioanei wrote:
 
 Index: mod/mod_ssl/ssl_faq.html
 ===
 RCS file: /cvs/src/usr.sbin/httpd/htdocs/manual/mod/mod_ssl/ssl_faq.html,v
 retrieving revision 1.12
 diff -u -r1.12 ssl_faq.html
 --- mod/mod_ssl/ssl_faq.html 18 Jun 2008 05:42:29 -  1.12
 +++ mod/mod_ssl/ssl_faq.html 27 Jan 2012 18:34:58 -
 @@ -500,7 +500,7 @@
   are done with full year value instead of abbreviating to two digits.
   p
   Additionally according to aa
 -href=http://www.apache.org/docs/misc/FAQ.html#year2000;Year 2000
 +href=../../misc/FAQ.html#year2000Year 2000
   statement/a  from the Apache Group, the Apache webserver is Year 
   2000
   compliant, too. But whether OpenSSL or the underlaying Operating 
   System
   (either a Unix or Win32 platform) is Year 2000 compliant is a 
   different
 
 
 Looking at latest online FAQ for Apache 1.3 it looks even worse than
 in-tree manual/FAQ.html
 
 http://httpd.apache.org/docs/1.3/misc/FAQ.html
 
 so I'm also not sure what's the option here.
 
 I think it's underlying, because underlaying means something not 
 really OS-related. :)
 http://en.wikipedia.org/wiki/Underlay
 

note also that underlaying is the past tense of underlie. that's
probably where the confusion arises. regardless, underlying is the
correct word, so i've fixed it.

two birds, ;)

jmc



OFERTA LIMITADA...SOLO POR ESTE MES

2012-01-29 Thread info
[IMAGE]

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



wscons: rename KS_GROUP_Ascii to _Plain

2012-01-29 Thread Steffen Daode Nurpmeso
Hey all interested,

while writing a small wscons(4) keycode utility i asked myself
why KS_GROUP_Ascii is named the way it is, since the (lower) byte
carries more information, at least eventually.

I looked around a bit, and found out that NetBSD did change the
name to KS_GROUP_Plain, which is in my view less misleading than
the current naming scheme.
So the diff below changes all occurrences in todays src/ (no
change at all in xenocara) to _Plain.

And i've also missed a macro which tells an application wether
a second byte is necessary to complete the current raw keycode.
I.e., currently i hardcode

((rc  0xF0) == 0xE0 || (rc  0xF8) == 0xF0)

but can/could use KS_GROUP()/KS_VALUE() to separate the components
after i finally have read the complete keysym.
This is not part of the diff, however.
Ciao,

--steffen

Index: sbin/wsconsctl/keysym.c
===
RCS file: /cvs/src/sbin/wsconsctl/keysym.c,v
retrieving revision 1.6
diff -a -p -u -r1.6 keysym.c
--- sbin/wsconsctl/keysym.c 28 Jun 2010 20:40:39 -  1.6
+++ sbin/wsconsctl/keysym.c 29 Jan 2012 17:37:04 -
@@ -229,7 +229,7 @@ ksym_upcase(keysym_t ksym)
if (ksym = KS_f1  ksym = KS_f20)
return(KS_F1 - KS_f1 + ksym);
 
-   if (KS_GROUP(ksym) == KS_GROUP_Ascii  ksym = 0xff 
+   if (KS_GROUP(ksym) == KS_GROUP_Plain  ksym = 0xff 
latin1_to_upper[ksym] != 0x00)
return(latin1_to_upper[ksym]);
 
Index: sys/dev/wscons/wsdisplay.c
===
RCS file: /cvs/src/sys/dev/wscons/wsdisplay.c,v
retrieving revision 1.105
diff -a -p -u -r1.105 wsdisplay.c
--- sys/dev/wscons/wsdisplay.c  3 Jul 2011 18:11:21 -   1.105
+++ sys/dev/wscons/wsdisplay.c  29 Jan 2012 17:38:44 -
@@ -1594,7 +1594,7 @@ wsdisplay_kbdinput(struct device *dev, k
 
tp = scr-scr_tty;
for (; num  0; num--, ks++) {
-   if (KS_GROUP(*ks) == KS_GROUP_Ascii)
+   if (KS_GROUP(*ks) == KS_GROUP_Plain)
(*linesw[tp-t_line].l_rint)(KS_VALUE(*ks), tp);
else {
count = (*scr-scr_dconf-wsemul-translate)
Index: sys/dev/wscons/wskbd.c
===
RCS file: /cvs/src/sys/dev/wscons/wskbd.c,v
retrieving revision 1.70
diff -a -p -u -r1.70 wskbd.c
--- sys/dev/wscons/wskbd.c  9 Nov 2011 14:27:52 -   1.70
+++ sys/dev/wscons/wskbd.c  29 Jan 2012 17:38:16 -
@@ -1265,7 +1265,7 @@ wskbd_cngetc(dev_t dev)
for(;;) {
if (num--  0) {
ks = wskbd_console_data.t_symbols[pos++];
-   if (KS_GROUP(ks) == KS_GROUP_Ascii)
+   if (KS_GROUP(ks) == KS_GROUP_Plain)
return (KS_VALUE(ks));  
} else {
(*wskbd_console_data.t_consops-getc)
@@ -1667,7 +1667,7 @@ wskbd_translate(struct wskbd_internal *i
res = KS_voidSymbol;
 
switch (KS_GROUP(ksym)) {
-   case KS_GROUP_Ascii:
+   case KS_GROUP_Plain:
case KS_GROUP_Keypad:
case KS_GROUP_Function:
res = ksym;
@@ -1716,7 +1716,7 @@ wskbd_translate(struct wskbd_internal *i
}
 
/* We are done, return the symbol */
-   if (KS_GROUP(res) == KS_GROUP_Ascii) {
+   if (KS_GROUP(res) == KS_GROUP_Plain) {
if (MOD_ONESET(id, MOD_ANYCONTROL)) {
if ((res = KS_at  res = KS_z) || res == KS_space)
res = res  0x1f;
Index: sys/dev/wscons/wskbdutil.c
===
RCS file: /cvs/src/sys/dev/wscons/wskbdutil.c,v
retrieving revision 1.9
diff -a -p -u -r1.9 wskbdutil.c
--- sys/dev/wscons/wskbdutil.c  28 Aug 2010 12:48:14 -  1.9
+++ sys/dev/wscons/wskbdutil.c  29 Jan 2012 17:37:44 -
@@ -268,7 +268,7 @@ ksym_upcase(keysym_t ksym)
if (ksym = KS_f1  ksym = KS_f20)
return(KS_F1 - KS_f1 + ksym);
 
-   if (KS_GROUP(ksym) == KS_GROUP_Ascii  ksym = 0xff 
+   if (KS_GROUP(ksym) == KS_GROUP_Plain  ksym = 0xff 
latin1_to_upper[ksym] != 0x00)
return(latin1_to_upper[ksym]);
 
Index: sys/dev/wscons/wsksymdef.h
===
RCS file: /cvs/src/sys/dev/wscons/wsksymdef.h,v
retrieving revision 1.34
diff -a -p -u -r1.34 wsksymdef.h
--- sys/dev/wscons/wsksymdef.h  5 Apr 2011 19:12:13 -   1.34
+++ sys/dev/wscons/wsksymdef.h  29 Jan 2012 17:45:41 -
@@ -684,7 +684,7 @@
 #define KS_GROUP_Command   0xf400
 #define KS_GROUP_Internal  0xf500
 #define KS_GROUP_Dead  0xf801  /* not encoded in keysym */
-#define KS_GROUP_Ascii 0xf802  /* not encoded in keysym */
+#define KS_GROUP_Plain 0xf802  /* not encoded in keysym */
 #define 

jot(1): simple typo

2012-01-29 Thread Okan Demirmen
typo in error message.

ok?

Index: jot.c
===
RCS file: /home/okan/openbsd/cvs/src/usr.bin/jot/jot.c,v
retrieving revision 1.20
diff -u -p -r1.20 jot.c
--- jot.c   27 Oct 2009 23:59:39 -  1.20
+++ jot.c   27 Jan 2012 20:29:22 -
@@ -108,7 +108,7 @@ main(int argc, char *argv[])
case 's':
if (strlcpy(sepstring, optarg, sizeof(sepstring)) =
sizeof(sepstring))
-   errx(1, -s word too long);
+   errx(1, -s string too long);
break;
case 'p':
prec = strtonum(optarg, 0, INT_MAX, errstr);



systat(1) netstat

2012-01-29 Thread Okan Demirmen
Hi,

The following small diff does the following:
 - allows the default to only show all non-listneing scokets, which matches
   the manpage and what netstat(1) does, sans the aflag (-a).
 - allows one to use 'a' to toggle the above (include listening or not).
 - implement [r]eset to reset all toggles to default (all/tcp/udp).
 - document a/n/r/t/u toggles.

comments/feedback/ok?

Cheers,
Okan

Index: netstat.c
===
RCS file: /home/okan/openbsd/cvs/src/usr.bin/systat/netstat.c,v
retrieving revision 1.34
diff -u -p -r1.34 netstat.c
--- netstat.c   2 Mar 2011 06:48:17 -   1.34
+++ netstat.c   27 Jan 2012 19:45:53 -
@@ -276,15 +276,17 @@ again:
 
if (!aflag) {
if (!(inpcb.inp_flags  INP_IPV6) 
-   inet_lnaof(inpcb.inp_laddr) == INADDR_ANY)
+   inet_lnaof(inpcb.inp_faddr) == INADDR_ANY)
continue;
if ((inpcb.inp_flags  INP_IPV6) 
-   IN6_IS_ADDR_UNSPECIFIED(inpcb.inp_laddr6))
+   IN6_IS_ADDR_UNSPECIFIED(inpcb.inp_faddr6))
continue;
}
KREAD(inpcb.inp_socket, sockb, sizeof (sockb));
if (istcp) {
KREAD(inpcb.inp_ppcb, tcpcb, sizeof (tcpcb));
+   if (!aflag  tcpcb.t_state = TCPS_LISTEN)
+   continue;
enter(inpcb, sockb, tcpcb.t_state, tcp);
} else
enter(inpcb, sockb, 0, udp);
@@ -438,8 +440,18 @@ int
 ns_keyboard_callback(int ch)
 {
switch (ch) {
+   case 'a':
+   aflag = !aflag;
+   gotsig_alarm = 1;
+   break;
case 'n':
nflag = !nflag;
+   gotsig_alarm = 1;
+   break;
+   case 'r':
+   aflag = 0;
+   nflag = 1;
+   protos = TCP|UDP;
gotsig_alarm = 1;
break;
case 't':
Index: systat.1
===
RCS file: /home/okan/openbsd/cvs/src/usr.bin/systat/systat.1,v
retrieving revision 1.92
diff -u -p -r1.92 systat.1
--- systat.129 Apr 2011 05:48:04 -  1.92
+++ systat.127 Jan 2012 15:13:55 -
@@ -295,49 +295,26 @@ Display mbuf usage information from kern
 and mbuf cluster pool statistics of each network interface.
 .It Ic netstat
 Display network connections.
-By default, network servers awaiting requests are not displayed.
 Each address
-is displayed in the format
-.Dq host:port ,
-with each shown symbolically, when possible.
-.\It is possible to have addresses displayed numerically,
-.\limit the display to a set of ports, hosts, and/or protocols
-.\(the minimum unambiguous prefix may be supplied):
-.\.Bl -tag -width Ar
-.\.It Cm all
-.\Toggle the displaying of server processes awaiting requests (this
-.\is the equivalent of the
-.\.Fl a
-.\flag to
-.\.Xr netstat 1 ) .
-.\.It Cm display Op Ar items
-.\Display information about the connections associated with the
-.\specified hosts or ports.
-.\As for
-.\.Ar ignore ,
-.\.Ar items
-.\may be names or numbers.
-.\.It Cm ignore Op Ar items
-.\Do not display information about connections associated with
-.\the specified hosts or ports.
-.\Hosts and ports may be specified
-.\by name
-.\.Pf ( Dq vangogh ,
-.\.Dq ftp ) ,
-.\or numerically.
-.\Host addresses
-.\use the Internet dot notation
-.\.Pq Dq 128.32.0.9 .
-.\Multiple items
-.\may be specified with a single command by separating them with
-.\spaces.
-.\.It Cm names
-.\Display network addresses symbolically.
-.\.It Cm numbers
-.\Display network addresses numerically.
-.\.It Cm reset
-.\Reset the port, host, and protocol matching mechanisms to the default
-.\(any protocol, port, or host).
+is displayed numerically in the format
+.Dq host:port .
+By default, network servers awaiting requests are not displayed.
+It is also possible to have addresses displayed symbolically,
+when possible, and limit the display to a set of protocols
+(the minimum unambiguous prefix may be supplied):
+.Bl -tag -width Ar
+.It Cm all
+Toggle the displaying of server processes awaiting requests (this
+is the equivalent of the
+.Fl a
+flag to
+.Xr netstat 1 ) .
+.It Cm names
+Display network addresses symbolically.
+.It Cm numbers
+Display network addresses numerically.
+.It Cm reset
+Reset matching mechanisms to the default.
 .\.It Cm show Oo
 .\.Ar protocols \*(Ba ports \*(Ba hosts
 .\.Oc
@@ -348,9 +325,9 @@ with each shown symbolically, when possi
 .\If an argument is supplied to
 .\.Cm show ,
 .\then only the requested information will be displayed.
-.\.It Cm tcp \*(Ba udp \*(Ba all
-.\Display only network connections using the indicated protocol.
-.\.El
+.It Cm tcp \*(Ba udp
+Display only network connections using the 

Re: Add OPENBSD-CARP-MIB to snmpd(8)

2012-01-29 Thread Joel Knight
On Fri, Jan 13, 2012 at 2:53 PM, Joel Knight knight.j...@gmail.com wrote:
 Hi,

 This diff integrates my existing snmp MIB for carp(4) into the base
 snmpd. I brought the MIB straight across with no changes. The only
 limitation I'm aware of is that it doesn't support the multiple
 carpnodes style loadbalancing; it only reports status on the main
 carpnode.

 http://www.packetmischief.ca/files/openbsd/patches/snmpd.carp.diff

Updated diff based on feedback from camield@

- relayd(8) already uses .30155.3 as its based OID for sending traps
so move carp to .30155.6
- fix file descriptor leak




.joel



Index: src/share/snmp/Makefile
===
RCS file: /cvs/src/share/snmp/Makefile,v
retrieving revision 1.1
diff -p -u -r1.1 Makefile
--- src/share/snmp/Makefile 23 Dec 2008 18:32:10 -  1.1
+++ src/share/snmp/Makefile 29 Jan 2012 13:29:42 -
@@ -2,6 +2,7 @@

 FILES= OPENBSD-SNMPD-CONF.txt OPENBSD-BASE-MIB.txt
 FILES+=OPENBSD-MEM-MIB.txt OPENBSD-SENSORS-MIB.txt
+FILES+= OPENBSD-CARP-MIB.txt

 all clean cleandir depend lint obj tags: _SUBDIRUSE

Index: src/share/snmp/OPENBSD-CARP-MIB.txt
===
RCS file: src/share/snmp/OPENBSD-CARP-MIB.txt
diff -N src/share/snmp/OPENBSD-CARP-MIB.txt
--- /dev/null   1 Jan 1970 00:00:00 -
+++ src/share/snmp/OPENBSD-CARP-MIB.txt 29 Jan 2012 13:29:42 -
@@ -0,0 +1,312 @@
+--
+-- $OpenBSD$
+--
+--
+-- Copyright (c) 2006-2011 Joel Knight knight.j...@gmail.com
+--
+-- Permission to use, copy, modify, and distribute this document for any
+-- purpose with or without fee is hereby granted, provided that the above
+-- copyright notice and this permission notice appear in all copies.
+--
+-- THE DOCUMENT IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+-- WITH REGARD TO THIS DOCUMENT INCLUDING ALL IMPLIED WARRANTIES OF
+-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS DOCUMENT.
+
+
+OPENBSD-CARP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+   MODULE-IDENTITY, NOTIFICATION-TYPE, OBJECT-TYPE,
+   Counter64, Integer32, enterprises
+   FROM SNMPv2-SMI
+
+   TruthValue
+   FROM SNMPv2-TC
+
+   openBSD
+   FROM OPENBSD-BASE-MIB
+   
+   MODULE-COMPLIANCE, OBJECT-GROUP
+   FROM SNMPv2-CONF;
+
+carpMIBObjects MODULE-IDENTITY
+LAST-UPDATED 20110513Z
+ORGANIZATION OpenBSD
+CONTACT-INFO 
+  Author: Joel Knight
+  email:  knight.j...@gmail.com
+  www:www.packetmischief.ca/openbsd-snmp-mibs/
+ 
+DESCRIPTION The MIB module for gathering information about
+   Common Address Redundancy Protocol (CARP) interfaces.
+
+::= { openBSD 6 }
+
+
+-- define the sections of the MIB
+
+carpSysctl OBJECT IDENTIFIER ::= { carpMIBObjects 1 }
+carpIf OBJECT IDENTIFIER ::= { carpMIBObjects 2 }
+carpStats  OBJECT IDENTIFIER ::= { carpMIBObjects 3 }
+
+
+-- carpSysctl
+carpAllow OBJECT-TYPE
+   SYNTAX  TruthValue
+   MAX-ACCESS  read-only
+   STATUS  current
+   DESCRIPTION
+   Indicates whether the node will respond to CARP packets.
+   ::= { carpSysctl 1 }
+
+carpPreempt OBJECT-TYPE
+   SYNTAX  TruthValue
+   MAX-ACCESS  read-only
+   STATUS  current
+   DESCRIPTION
+   Indicates whether preemption is enabled.
+   ::= { carpSysctl 2 }
+
+carpLog OBJECT-TYPE
+   SYNTAX  TruthValue
+   MAX-ACCESS  read-only
+   STATUS  current
+   DESCRIPTION
+   Indicates whether logging of invalud CARP packets is enabled.
+   ::= { carpSysctl 3 }
+
+
+-- carpIf
+
+carpIfNumber OBJECT-TYPE
+   SYNTAX  Integer32
+   MAX-ACCESS  read-only
+   STATUS  current
+   DESCRIPTION
+   The number of CARP interfaces present on this system.
+   ::= { carpIf 1 }
+
+carpIfTable OBJECT-TYPE
+   SYNTAX  SEQUENCE OF CarpIfEntry
+   MAX-ACCESS  not-accessible
+   STATUS  current
+   DESCRIPTION
+   A list of individual CARP interfaces. The number of entries is
+   given by the value of carpIfNumber.
+   ::= { carpIf 2 }
+
+carpIfEntry OBJECT-TYPE
+   SYNTAX  CarpIfEntry
+   MAX-ACCESS  not-accessible
+   STATUS  current
+   DESCRIPTION
+   An entry containing management information applicable to a
+   particular CARP interface.
+   INDEX   { carpIfIndex }
+   ::= { carpIfTable 1 }
+
+CarpIfEntry ::=
+   SEQUENCE {
+

snmpd sensor descriptions

2012-01-29 Thread Joel Knight
Hi,

If the kernel sensor doesn't have a description, snmpd should fill
something into that column to avoid an empty value. An empty value
makes it really hard to tell what the sensor is.

Before:

SNMPv2-SMI::enterprises.30155.2.1.2.1.2.1 = 
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.2 = 
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.3 = 
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.4 = 
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.5 = 
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.6 = 
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.7 = STRING: VCore A
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.8 = STRING: VCore B

After:

SNMPv2-SMI::enterprises.30155.2.1.2.1.2.1 = STRING: temp0
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.2 = STRING: temp1
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.3 = STRING: temp2
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.4 = STRING: fan0
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.5 = STRING: fan1
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.6 = STRING: fan2
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.7 = STRING: VCore A
SNMPv2-SMI::enterprises.30155.2.1.2.1.2.8 = STRING: VCore B


ok?



.joel




Index: src/usr.sbin/snmpd/mib.c
===
RCS file: /cvs/src/usr.sbin/snmpd/mib.c,v
retrieving revision 1.47
diff -p -u -r1.47 mib.c
--- src/usr.sbin/snmpd/mib.c16 Sep 2011 20:52:48 -  1.47
+++ src/usr.sbin/snmpd/mib.c30 Jan 2012 05:22:45 -
@@ -1271,6 +1271,7 @@ mib_sensors(struct oid *oid, struct ber_
size_t   len = sizeof(sensordev);
struct sensorsensor;
size_t   slen = sizeof(sensor);
+   char desc[32];
int  mib[] = { CTL_HW, HW_SENSORS, 0, 0, 0 };
int  i, j, k;
u_int32_tidx = 0, n;
@@ -1315,7 +1316,13 @@ mib_sensors(struct oid *oid, struct ber_
ber = ber_add_integer(ber, (int32_t)n);
break;
case 2:
-   ber = ber_add_string(ber, sensor.desc);
+   if (sensor.desc[0] == '\0') {
+   snprintf(desc, sizeof(desc), %s%d,
+   sensor_type_s[sensor.type],
+   sensor.numt);
+   ber = ber_add_string(ber, desc);
+   } else
+   ber = ber_add_string(ber, sensor.desc);
break;
case 3:
ber = ber_add_integer(ber, sensor.type);



Re: systat(1) netstat

2012-01-29 Thread LEVAI Daniel
On Sun, Jan 29, 2012 at 15:46:10 -0500, Okan Demirmen wrote:
 Hi,
 
 The following small diff does the following:
  - allows the default to only show all non-listneing scokets, which matches
the manpage and what netstat(1) does, sans the aflag (-a).
  - allows one to use 'a' to toggle the above (include listening or not).
  - implement [r]eset to reset all toggles to default (all/tcp/udp).
  - document a/n/r/t/u toggles.
 
 comments/feedback/ok?

Great, works as advertised :) Thanks!


Daniel

-- 
LIVAI Daniel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D  650C C69B BE4C 83B6 3A8F