Re: How broken is IBSS creation (wicontrol) these days ?
I just got IBSS working on a 4.4-STABLE box (in the PCI carrier, for what it's worth). When using the Agere (aka Orinoco aka Lucent) drivers (latest) on a Windows box it finds the FreeBSD box as a 'Peer to Peer' network. It can detect the network name and channel, although it takes it a long time. Setting the network name and channel makes it go much quicker. I get no signal strength meter, can't do site monitoring or link testing, but it works fine. In talking with some other friends, it appears on the older lucent drivers you must set the netname for it to find it at all. From my limited understanding of the spec the lack of signal strength is a result of being in peer to peer mode. The card can only keep one set of stats -- it normally communicates only to the AP (even if talking to another card, works just like 10baseT going to the 'hub' and back). In peer-to-peer mode it talks to a random number of other cards directly, and it just can't keep the stats. It sounds like your two boxes are almost right. I had some issues with WEP, but it doesn't look like you're using it. (WEP works fine if you make everything match, really. :-) Make sure you ifconfig wi0 up if you're not otherwise configuring it. I wish it could work as a proper access point. My understanding is that configuring the bits on the card is easy, but there's some confusion over how to program the card (and/or do the right things in the driver) to make the relay of 802.11 frames work right. I'm not sure who's working on that, but if I can help here's an offer. -- Leo Bicknell - [EMAIL PROTECTED] Systems Engineer - Internetworking Engineer - CCIE 3440 Read TMBG List - [EMAIL PROTECTED], www.tmbg.org To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Duping a hard disk
I am running a lab with 43 FreeBDS machines and will be adding about 20 more in the near future. ALL these machines are absolutely identical except for IP address and machine name. To speed up the adding of new machines, I envision making a duplication station, where I would add a new disk as a slave and then dup the master disk to the slave disk. Then I would only have to change IP and machine name. But alas, I cannot find any procedures for doing this. Does anyone know how to duplicate a master disk to a new slave disk??? It would REALLY make my life much easier. BTW, We are running 3.2. Yea, I know it's ancient but we have added significant kernel hacks to support specialized ATN and X.25 protocols and don't envision upgrading until we get our modifications completed. Any insight would be appreciated. Mike Smith (but not THE Mike Smith) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
On Tue, Oct 23, 2001 at 08:35:05AM -0400, PSI, Mike Smith wrote: I am running a lab with 43 FreeBDS machines and will be adding about 20 more in the near future. ALL these machines are absolutely identical except for IP address and machine name. To speed up the adding of new machines, I envision making a duplication station, where I would add a new disk as a slave and then dup the master disk to the slave disk. Then I would only have to change IP and machine name. But alas, I cannot find any procedures for doing this. Does anyone know how to duplicate a master disk to a new slave disk??? It would REALLY make my life much easier. Is there anything wrong with dd(1)? G'luck, Peter -- If this sentence didn't exist, somebody would have invented it. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: cvs commit: src/lib/libc/net rcmdsh.3 rcmdsh.c Makefile.inc rcmd.c
On Mon, Oct 22, 2001 at 11:22:15PM -0700, Warner Losh wrote: imp 2001/10/22 23:22:15 PDT Modified files: lib/libc/net Makefile.inc rcmd.c Added files: lib/libc/net rcmdsh.3 rcmdsh.c Log: Allow users to specify a command to use as remote command instead of using rcmd directly. This has been in my tree for a long time, but we may need to sync with OpenBSD before MFC. Obtained from: openbsd PR: 15830 MFC after: 2 months Yay! Does this mean one can use ssh with dump/restore now? -- Jacques A. Vidrine [EMAIL PROTECTED] http://www.nectar.com/ Verio Web Hosting = FreeBSD UNIX =Heimdal Kerberos [EMAIL PROTECTED] = [EMAIL PROTECTED] = [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
On Tue, Oct 23, 2001 at 03:45:07PM +0300, Peter Pentchev wrote: On Tue, Oct 23, 2001 at 08:35:05AM -0400, PSI, Mike Smith wrote: I am running a lab with 43 FreeBDS machines and will be adding about 20 more in the near future. ALL these machines are absolutely identical except for IP address and machine name. To speed up the adding of new machines, I envision making a duplication station, where I would add a new disk as a slave and then dup the master disk to the slave disk. Then I would only have to change IP and machine name. But alas, I cannot find any procedures for doing this. Does anyone know how to duplicate a master disk to a new slave disk??? It would REALLY make my life much easier. Is there anything wrong with dd(1)? OK, this *was* a bit glib. What I mean is, surely you can use dd(1) to copy an existing partition (or even slice) to another partition (or slice) with the same size. Yes, I do realize that sometimes it is not so easy to reproduce the exact slice layout; this is something that I have encountered a couple of times at my workplace, too, and I've dealt with it by using tar -cpf - | tar -xpf - -C /new/path. This poses other kinds of problems by itself, but seems to have worked for me so far. As for creating the partitions/slices themselves - if the new disk's size is the same as the old one's, then you might use disklabel -r on the old disk, record the output into a file and disklabel the new disk from that. If the disks are not the same, well, then you have to do this by hand. G'luck, Peter -- This sentence contains exactly threee erors. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
Norton Ghost v6.0 ou v7.0 will do... I am not on the Symantec payroll in any way... :) - Original Message - From: PSI, Mike Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 23, 2001 1:35 PM Subject: Duping a hard disk I am running a lab with 43 FreeBDS machines and will be adding about 20 more in the near future. ALL these machines are absolutely identical except for IP address and machine name. To speed up the adding of new machines, I envision making a duplication station, where I would add a new disk as a slave and then dup the master disk to the slave disk. Then I would only have to change IP and machine name. But alas, I cannot find any procedures for doing this. Does anyone know how to duplicate a master disk to a new slave disk??? It would REALLY make my life much easier. BTW, We are running 3.2. Yea, I know it's ancient but we have added significant kernel hacks to support specialized ATN and X.25 protocols and don't envision upgrading until we get our modifications completed. Any insight would be appreciated. Mike Smith (but not THE Mike Smith) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
On Tue, Oct 23, 2001 at 08:35:05AM -0400, PSI, Mike Smith wrote: But alas, I cannot find any procedures for doing this. Does anyone know how to duplicate a master disk to a new slave disk??? It would REALLY make my life much easier. I've done this two ways before. 1) If your disks are _really_ identical you can make a disk with the image you want, and dd the raw c partition from old to new. I used to do this a lot with DECStations, but also with FreeBSD boxen. It's easiest if you can make a boot disk and an image disk in an external case, POP it on the SCSI bus and then image an internal drive. IDE makes for a lot more case opening operations. 2) For a lab, I recomend near-constant rebuilding/monitoring. For this rdist (actually, newer variants) are your friend. Have the machines push out the changes you're interested in, as well as make sure everything is ok once a night. Weird things happen to lab machines. Note, if you want the machines to dual-boot to windows, and you install windows on a FAT file system you can mount it under FreeBSD and let rdist do it's thing nightly. It's so nice to have the easily corrupted Windows boxes reinstall every night from a clean tree. -- Leo Bicknell - [EMAIL PROTECTED] Systems Engineer - Internetworking Engineer - CCIE 3440 Read TMBG List - [EMAIL PROTECTED], www.tmbg.org To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
Why not build a custom release of FBSD and use sysinstall's scripting abilities to install and configure automatically? Then to reinstall any of them just build/burn a boot floppy/cd and pop it in. kyle. On Tue, 23 Oct 2001, PSI, Mike Smith wrote: I am running a lab with 43 FreeBDS machines and will be adding about 20 more in the near future. ALL these machines are absolutely identical except for IP address and machine name. To speed up the adding of new machines, I envision making a duplication station, where I would add a new disk as a slave and then dup the master disk to the slave disk. Then I would only have to change IP and machine name. But alas, I cannot find any procedures for doing this. Does anyone know how to duplicate a master disk to a new slave disk??? It would REALLY make my life much easier. BTW, We are running 3.2. Yea, I know it's ancient but we have added significant kernel hacks to support specialized ATN and X.25 protocols and don't envision upgrading until we get our modifications completed. Any insight would be appreciated. Mike Smith (but not THE Mike Smith) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
On Tue, Oct 23, 2001 at 02:19:21PM +0100, José Azevedo - INEGI wrote: Norton Ghost v6.0 ou v7.0 will do... Norton Ghost will fallback to dd(1)-like behavior for file system types that it doesn't know how to read (anything other than FAT/NTFS). Thus it won't afford you any speed or size optimizations for this purpose. It also requires that you boot into a very inconvenient operating system. What's wrong with dump(8)/restore(8)? -- || Seth Kingsley || Meow Meow Fluff Fluff || [EMAIL PROTECTED] || || rndcontrol -s 0 || PGP signature
Re: Duping a hard disk
We netboot via PXE and run sysinstall. It takes about 6 minutes. You can make packages out of your specialized stuff. This make it easy to keep up to date as well as build. You don't need to worry about the drives being the same size etc either, and different config scripts let you build different kinds of systems very easily. We use all Intel NICs which support PXE, but I think you could do this with netboot also. Pete On Tue, Oct 23, 2001 at 08:35:05AM -0400, PSI, Mike Smith wrote: I am running a lab with 43 FreeBDS machines and will be adding about 20 more in the near future. ALL these machines are absolutely identical except for IP address and machine name. To speed up the adding of new machines, I envision making a duplication station, where I would add a new disk as a slave and then dup the master disk to the slave disk. Then I would only have to change IP and machine name. But alas, I cannot find any procedures for doing this. Does anyone know how to duplicate a master disk to a new slave disk??? It would REALLY make my life much easier. BTW, We are running 3.2. Yea, I know it's ancient but we have added significant kernel hacks to support specialized ATN and X.25 protocols and don't envision upgrading until we get our modifications completed. Any insight would be appreciated. Mike Smith (but not THE Mike Smith) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message -- Peter McKenna Qwest Internet Solutions [EMAIL PROTECTED] Main 612-664-4000 FAX 612-664-4770 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
On Tue, 23 Oct 2001, Peter Pentchev wrote: Is there anything wrong with dd(1)? A lot. Best way I found was dump | restore, i.e. mkfs /dev/newdisk mount /dev/newdisk /newdisk dump 0f - / | (cd /newdisk; restore rf -) or equivalent ... - yes, you can use tar, but you have to remember all the options - yes, you can use dd, if you don't mind copying EVERY BLOCK, including the ones full of zeros or that are unused - over the network, you can compress the data I dup'ed 64 machines this way once over the network and it went FAST. What we used to do is have a CD boot disk (we built one 128-node cluster with NO FLOPPIES -- floppies suck). It works well. Of course with the bproc stuff we are totally out of the disk dup business for clusters, but for desktops it is nice to be able to slam a cdrom in and have the machine initialized. ron To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: cvs commit: src/lib/libc/net rcmdsh.3 rcmdsh.c Makefile.inc rcmd.c
On Tue, Oct 23, 2001 at 07:16:38AM -0700, Seth Kingsley wrote: On Tue, Oct 23, 2001 at 07:56:26AM -0500, Jacques A. Vidrine wrote: Yay! Does this mean one can use ssh with dump/restore now? Since when couldn't you just use: ssh host dump -b 8 -f - | dd bs=8k file and similar for restore? Think about what happens if your filesystem cannot fit on a single volume. -- Jacques A. Vidrine [EMAIL PROTECTED] http://www.nectar.com/ Verio Web Hosting = FreeBSD UNIX =Heimdal Kerberos [EMAIL PROTECTED] = [EMAIL PROTECTED] = [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
In message [EMAIL PROTECTED], PSI, Mike Smith cleopede: I am running a lab with 43 FreeBDS machines and will be adding about 20 more in the near future. ALL these machines are absolutely identical except for IP address and machine name. To speed up the adding of new machines, I envision making a duplication station, where I would add a new disk as a slave and then dup the master disk to the slave disk. Then I would only have to change IP and machine name. But alas, I cannot find any procedures for doing this. Does anyone know how to duplicate a master disk to a new slave disk??? It would REALLY make my life much easier. BTW, We are running 3.2. Yea, I know it's ancient but we have added significant kernel hacks to support specialized ATN and X.25 protocols and don't envision upgrading until we get our modifications completed. I have done this two ways. One way was to set up, as you say, a duplication station where I would connect the target disk and dd the source disk to it. The other way was to create a compressed tape image of the source disk and carry an external tapedrive around, along with a floppy with enough of a system on it to boot, read the tape, and write the disk. I have been thinking about this lately, because both of those methods are somewhat unwieldy. My current thinking is to configure all the disks to have a second, minimal root partition on them that doesn't depend upon the actual system in any way. The idea is to boot the systems to that partition and then copy in the new configuration across the LAN, leaving the copyin partition untouched. While the copyin system is running, you can mount tweek the newly installed system. If you want to update the copyin partition, you can do it later once the main system is running. A second idea I've been pondering is to buy some of those kits that convert a drive into a removeable, and go back to the duplication station concept. For this to work well, you need some extra hard disks--you build the new system on a basketful of spares, and then walk around the lab swapping them in. Build the new system on the ones you just swapped out, and repeat until everyone is updated. This would imply that user data (if any) would be somewhere else, such as a second internal disk. Also, as someone else has suggested, use rdist for small updates. But I think that for a major upgrade it is worth setting everything up on a testbed system, and then doing a reinstall on all the other machines. BTW, if you are running 3.2, make sure you have updated or disabled telnetd to avoid the exploit. The system in our lab that was hacked a while back was running 3.2, so the exploit definitely works on it. Greg Shenaut To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Fwd: user-level ppp and address range
No one has answered to me, so I have to ask again. Anyone, help me! WBR, Pavel mailto:[EMAIL PROTECTED]icq:52216261 This is a forwarded message From: Pavel Levshin [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Friday, October 19, 2001, 5:15:40 PM Subject: user-level ppp and address range ===8==Original message text=== Hello, It seemes like there are a problem in the user-level ppp. It assigns the same IP from the range to two of concurrent connections; therefore, second connection does not work. What can I do with this? Excerpts from the log: Oct 19 00:05:48 finity ppp[97414]: Phase: Using interface: tun0 Oct 19 00:05:48 finity ppp[97414]: Phase: deflink: Created in closed state ... Oct 19 00:05:48 finity ppp[97414]: Command: default: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 ... Oct 19 00:05:48 finity ppp[97414]: Command: incoming: set ifaddr 195.201.62.9 195.201.62.11-195.201.62.15 255.255.255.255 Oct 19 00:05:48 finity ppp[97414]: IPCP: Selected IP address 195.201.62.12 ... Oct 19 01:53:40 finity ppp[98580]: Phase: Using interface: tun1 Oct 19 01:53:40 finity ppp[98580]: Phase: deflink: Created in closed state ... Oct 19 01:53:40 finity ppp[98580]: Command: default: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 ... Oct 19 01:53:40 finity ppp[98580]: Command: incoming: set ifaddr 195.201.62.9 195.201.62.11-195.201.62.15 255.255.255.255 Oct 19 01:53:40 finity ppp[98580]: IPCP: Selected IP address 195.201.62.12 ... Oct 19 01:54:56 finity ppp[98580]: IPCP: Connect time: 74 secs: 1175 octets in, 0 octets out Oct 19 01:54:56 finity ppp[98580]: IPCP: : 10 packets in, 0 packets out ... Oct 19 02:15:27 finity ppp[97414]: IPCP: Connect time: 7774 secs: 2328528 octets in, 14736543 octets out Oct 19 02:15:27 finity ppp[97414]: IPCP: : 31629 packets in, 32645 packets out My setup (slightly modified today, as I tried to get it work) is as follows: FreeBSD 4.4-RC (28 Aug), mgetty, user-land ppp. ===ppp.conf=== default: set log Phase Chat Connect lcp ipcp ccp command set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 set timeout 600 enable pap enable chap accept dns set dns 195.201.62.2 incoming: set ifaddr 195.201.62.9 195.201.62.11-195.201.62.15 255.255.255.255 enable proxy ===ppp.conf=== ===ppplogin=== #!/bin/sh /usr/sbin/ppp -direct incoming ===ppplogin=== -- WBR, Pavel mailto:[EMAIL PROTECTED]icq:52216261 ===8===End of original message text=== To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: cvs commit: src/lib/libc/net rcmdsh.3 rcmdsh.c Makefile.inc rcmd.c
In message [EMAIL PROTECTED] Jacques A. Vidrine writes: : Yay! Does this mean one can use ssh with dump/restore now? Yes. I need to verify that OpenBSD's version isn't too different than what I committed. I mostly wanted to get it out of my tree (since it has been three about 20 months. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: cvs commit: src/lib/libc/net rcmdsh.3 rcmdsh.c Makefile.inc rcmd.c
In message [EMAIL PROTECTED] Seth Kingsley writes: : : --ALfTUftag+2gvp1h : Content-Type: text/plain; charset=us-ascii : Content-Disposition: inline : Content-Transfer-Encoding: quoted-printable : : On Tue, Oct 23, 2001 at 07:56:26AM -0500, Jacques A. Vidrine wrote: : Yay! Does this mean one can use ssh with dump/restore now? : : Since when couldn't you just use: : : ssh host dump -b 8 -f - | dd bs=8k file : : and similar for restore? You could, but that has issues with tape drives. With these patches, you can do it to multiple tapes. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
CFS
Hi! I want to install a cyphred partition on my system. I use FreeBSD, and I want to know what software is avaivle in order to do it. I heard about CFS and TCFS (but this is not still supported by FreeBSD), is there any better bet? If anyone know any good resource (sites, papers, ...) on these topics please tell me. Best Regards. Jesus Arnaiz. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
This is the way I'd reccomend doing it. Getting the initial bits in place can be a pain but once that's done it's a cinch and very fast and easy to maintain. -Bill On Tue, Oct 23, 2001 at 09:11:10AM -0500, Pete McKenna wrote: We netboot via PXE and run sysinstall. It takes about 6 minutes. You can make packages out of your specialized stuff. This make it easy to keep up to date as well as build. You don't need to worry about the drives being the same size etc either, and different config scripts let you build different kinds of systems very easily. We use all Intel NICs which support PXE, but I think you could do this with netboot also. Pete On Tue, Oct 23, 2001 at 08:35:05AM -0400, PSI, Mike Smith wrote: I am running a lab with 43 FreeBDS machines and will be adding about 20 more in the near future. ALL these machines are absolutely identical except for IP address and machine name. To speed up the adding of new machines, I envision making a duplication station, where I would add a new disk as a slave and then dup the master disk to the slave disk. Then I would only have to change IP and machine name. But alas, I cannot find any procedures for doing this. Does anyone know how to duplicate a master disk to a new slave disk??? It would REALLY make my life much easier. BTW, We are running 3.2. Yea, I know it's ancient but we have added significant kernel hacks to support specialized ATN and X.25 protocols and don't envision upgrading until we get our modifications completed. Any insight would be appreciated. Mike Smith (but not THE Mike Smith) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message -- Peter McKenna Qwest Internet Solutions [EMAIL PROTECTED] Main 612-664-4000 FAX 612-664-4770 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message -- -=| Bill Swingle - unfurl@(dub.net|freebsd.org) -=| Every message PGP signed -=| Fingerprint: C1E3 49D1 EFC9 3EE0 EA6E 6414 5200 1C95 8E09 0223 -=| Different all twisty a of in maze are you, passages little PGP signature
getenv_foo and TUNABLE_FOO_FETCH change
Currently getenv_quad() claims to return a quad_t, but it's actual return value is 1 if it found the environment variable in question and converted it ok and 0 if it didn't. getenv_int() has the same return value. I'd like to apply the same to TUNABLE_*_FETCH so that one can do: if (TUNABLE_INT_FETCH(some.tunable.var, temp_var)) if (bounds_check(temp_var)) real_var = temp_var; The resulting changes look like this: Index: kern/kern_environment.c === RCS file: /usr/cvs/src/sys/kern/kern_environment.c,v retrieving revision 1.18 diff -u -r1.18 kern_environment.c --- kern/kern_environment.c 10 Oct 2001 23:06:53 - 1.18 +++ kern/kern_environment.c 22 Oct 2001 22:41:08 - @@ -46,6 +46,9 @@ static char*kernenv_next(char *cp); +/* + * Look up an environment variable by name. + */ char * getenv(const char *name) { @@ -65,6 +68,23 @@ } /* + * Return a string value from an environment variable. + */ +int +getenv_string(const char *name, char *data, int size) +{ +char *tmp; + +tmp = getenv(name); +if (tmp == NULL) { + strncpy(data, tmp, size); + data[size - 1] = 0; + return (1); +} else + return (0); +} + +/* * Return an integer value from an environment variable. */ int @@ -83,7 +103,7 @@ /* * Return a quad_t value from an environment variable. */ -quad_t +int getenv_quad(const char *name, quad_t *data) { const char *value; Index: sys/systm.h === RCS file: /usr/cvs/src/sys/sys/systm.h,v retrieving revision 1.154 diff -u -r1.154 systm.h --- sys/systm.h 20 Sep 2001 21:45:31 - 1.154 +++ sys/systm.h 23 Oct 2001 17:24:12 - @@ -192,7 +192,8 @@ char *getenv __P((const char *name)); intgetenv_int __P((const char *name, int *data)); -quad_t getenv_quad __P((const char *name, quad_t *data)); +intgetenv_string __P((const char *name, char *data, int size)); +intgetenv_quad __P((const char *name, quad_t *data)); #ifdef APM_FIXUP_CALLTODO struct timeval; Index: sys/kernel.h === RCS file: /usr/cvs/src/sys/sys/kernel.h,v retrieving revision 1.94 diff -u -r1.94 kernel.h --- sys/kernel.h10 Oct 2001 23:06:54 - 1.94 +++ sys/kernel.h22 Oct 2001 23:39:18 - @@ -277,10 +277,7 @@ SYSINIT(__Tunable_init_ ## line, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, \ tunable_int_init, __tunable_int_ ## line) -#defineTUNABLE_INT_FETCH(path, var)\ -do { \ - getenv_int((path), (var)); \ -} while (0) +#defineTUNABLE_INT_FETCH(path, var)getenv_int((path), (var)) extern void tunable_quad_init(void *); struct tunable_quad { @@ -300,10 +297,7 @@ SYSINIT(__Tunable_init_ ## line, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, \ tunable_quad_init, __tunable_quad_ ## line) -#defineTUNABLE_QUAD_FETCH(path, var) \ -do { \ - getenv_quad((path), (var)); \ -} while (0) +#defineTUNABLE_QUAD_FETCH(path, var) getenv_quad((path), (var)) extern void tunable_str_init(void *); struct tunable_str { @@ -325,15 +319,8 @@ SYSINIT(__Tunable_init_ ## line, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, \ tunable_str_init, __tunable_str_ ## line) -#defineTUNABLE_STR_FETCH(path, var, size) \ -do { \ - char *tmp; \ - tmp = getenv((path)); \ - if (tmp != NULL) { \ - strncpy((var), tmp, (size));\ - (var)[(size) - 1] = 0; \ - } \ -} while (0) +#defineTUNABLE_STR_FETCH(path, var, size) \ + getenv_string((path), (var), (size)) struct intr_config_hook { TAILQ_ENTRY(intr_config_hook) ich_links; Also, one final note about using do { } while(0). If you actually read style(9), you will see that you are supposed to use it for compound statements, not just for any macro that happens to be more than one line long. If the macro's body is a single statement, it doesn't need the do { } while (0) bit. -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc Power Users Use the Power to Serve! - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: getenv_foo and TUNABLE_FOO_FETCH change
John Baldwin wrote: Also, one final note about using do { } while(0). If you actually read style(9), you will see that you are supposed to use it for compound statement s, not just for any macro that happens to be more than one line long. If the macro's body is a single statement, it doesn't need the do { } while (0) bit. It was there so that the macro didn't have a value. Since you're changing this so they all have a meaningful return (eg: TUNABLE_STR_FETCH() did not before) then removing this makes sense. Cheers, -Peter -- Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] All of this is for nothing if we don't go to the stars - JMS/B5 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: getenv_foo and TUNABLE_FOO_FETCH change
On 23-Oct-01 Peter Wemm wrote: John Baldwin wrote: Also, one final note about using do { } while(0). If you actually read style(9), you will see that you are supposed to use it for compound statement s, not just for any macro that happens to be more than one line long. If the macro's body is a single statement, it doesn't need the do { } while (0) bit. It was there so that the macro didn't have a value. Since you're changing this so they all have a meaningful return (eg: TUNABLE_STR_FETCH() did not before) then removing this makes sense. Fair enough. It was more a side commentary as I've seen random commits that make this mistake on other macros. -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc Power Users Use the Power to Serve! - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
sx_assert() vs. SX_ASSERT_*()
Anyone object greatly to making a change to the sx(9) API to use an sx_assert() function similar to mtx_assert() for mutexes instead of having several SX_ASSERT_FOO macros? Here is what the new API would look like: sx_assert(foo_lock, SX_LOCKED); sx_assert(bar_lock, SX_SLOCKED); vs. SX_ASSERT_LOCKED(foo_lock); SX_ASSERT_SLOCKED(bar_lock); -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc Power Users Use the Power to Serve! - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
On Tue, 23 Oct 2001, PSI, Mike Smith wrote: I am running a lab with 43 FreeBDS machines and will be adding about 20 more in the near future. ALL these machines are absolutely identical except for IP address and machine name. To speed up the adding of new machines, I envision making a duplication station, where I would add a new disk as a slave and then dup the master disk to the slave disk. Then I would only have to change IP and machine name. If your machines have netboot or floppy-boot capability, you might look at the PicoBSD install set. It's a bit dated, but I've used the same system with PXE netbooting to install tons of machines. It can NFS mount just about anything, so you can rig your own autoconfig scheme so you don't need to set the machine name IP manually :) Doug White| FreeBSD: The Power to Serve [EMAIL PROTECTED] | www.FreeBSD.org To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Duping a hard disk
There was a discussion on -mobile about this: http://groups.google.com/groups?threadm=9p26gi%241ehb%241%40FreeBSD.csie.NCTU.edu.tw - Willem van Engen On Tue, 23 Oct 2001 08:35:05 -0400 PSI, Mike Smith [EMAIL PROTECTED] wrote: I am running a lab with 43 FreeBDS machines and will be adding about 20 more in the near future. ALL these machines are absolutely identical except for IP address and machine name. To speed up the adding of new machines, I envision making a duplication station, where I would add a new disk as a slave and then dup the master disk to the slave disk. Then I would only have to change IP and machine name. But alas, I cannot find any procedures for doing this. Does anyone know how to duplicate a master disk to a new slave disk??? It would REALLY make my life much easier. BTW, We are running 3.2. Yea, I know it's ancient but we have added significant kernel hacks to support specialized ATN and X.25 protocols and don't envision upgrading until we get our modifications completed. Any insight would be appreciated. Mike Smith (but not THE Mike Smith) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message PGP signature
IBSS creation - summary
I have now successfully gotten IBSS creation under `wicontrol` to work in 4.4-RELEASE (using the -c 1 command line switch). This is my procedure: - configure interface wi0 with an address (through rc.conf or ifconfig) - wicontrol -c 1 -p 1 -n netname -q netname -s computername Note: the above `wicontrol` parameters cannot all be configured in one command line - instead, do: wicontrol -c 1 wicontrol -p 1 wicontrol -n netname wicontrol -q netname wicontrol -s computername Then, on the other computer: - configure interface with ifconfig - set the netname. In FreeBSD, use `wicontrol -n netname`, in Linux, use `iwconfig eth0 essid netname` (where eth0 is the devicename of your wireless adaptor on that system) Caveat: I did all this previously, but never thought things were working - the reason is, after you do all this, wicontrol in FreeBSD will show zero signal, and iwconfig in Linux will show zero signal. Further, `ifconfig` output in FreeBSD will report No Carrier. Therefore, I thought I had failed. In reality, it _is_ working - just make sure your interfaces are configured with IP and netmask the way you think they should be and attempt to make connection. It will work. You will also have an indication that it is working based on rapid flashing of the activity light on the Lucent/Agere/Orinico/(insert OEM'd version of that card here). - John Kozubik - [EMAIL PROTECTED] - http://www.kozubik.com To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: IBSS creation - summary
On Tue, Oct 23, 2001 at 03:55:49PM -0700, John Kozubik wrote: output in FreeBSD will report No Carrier. Therefore, I thought I had For what it's worth, mine oscellates between aassociated and no carrier. Also, the 'signal' and 'noise' parameters from wicontrol on FreeBSD seem to accurately represent link quality (from my simple walk away, walk towards) testing. The lucent drivers on my windows box always show no signal. All of my work is with 4.4-STABLE from about two weeks ago. I'll say this again, if someone is working on making the changes so FreeBSD can be a proper access point, I'll help in any way that I can. -- Leo Bicknell - [EMAIL PROTECTED] Systems Engineer - Internetworking Engineer - CCIE 3440 Read TMBG List - [EMAIL PROTECTED], www.tmbg.org To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: IBSS creation - summary
For what it's worth, mine oscellates between aassociated and no carrier. Also, the 'signal' and 'noise' parameters from wicontrol on FreeBSD seem to accurately represent link quality (from my simple walk away, walk towards) testing. The lucent drivers on my windows box always show no signal. All of my work is with 4.4-STABLE from about two weeks ago. I have FreeBSD 4.4-RELEASE on the IBSS end, and Linux Familiar 2.4.7 on the other end (basically Debian on ARM) (Compaq IPAQ). I see a very consistent no carrier in the ifconfig output on the FreeBSD machine, and a very consistent 0 for signal strength on both machines. I will continue my testing... - John Kozubik - [EMAIL PROTECTED] - http://www.kozubik.com To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: IBSS creation - summary
There is some movement on this as the guy who was in charge of negotiating with lucent (it needs different firmware) recently started to spend more time on it. On Tue, 23 Oct 2001, John Baldwin wrote: On 23-Oct-01 Leo Bicknell wrote: On Tue, Oct 23, 2001 at 03:55:49PM -0700, John Kozubik wrote: output in FreeBSD will report No Carrier. Therefore, I thought I had For what it's worth, mine oscellates between aassociated and no carrier. Also, the 'signal' and 'noise' parameters from wicontrol on FreeBSD seem to accurately represent link quality (from my simple walk away, walk towards) testing. The lucent drivers on my windows box always show no signal. All of my work is with 4.4-STABLE from about two weeks ago. I'll say this again, if someone is working on making the changes so FreeBSD can be a proper access point, I'll help in any way that I can. You can talk to Julian Elischer ([EMAIL PROTECTED]). I believe he worked for a company that was developing a binary only driver for the wavelans that would allow it to be a base station. You would have to purchase this driver I think, but it would be much cheaper than buying an access point. :) -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc Power Users Use the Power to Serve! - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
RE: A stupid question about pmap
[forwarded to -hackers] --- Jonathan Slivko - 4EverMail.COM - www.4evermail.com Web Hosting - Web Desgin - UNIX Shell Accounts [EMAIL PROTECTED] - Phone: (212) 663-1109 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of XuYifeng Sent: Tuesday, October 23, 2001 9:00 PM To: [EMAIL PROTECTED] Subject: A stupid question about pmap Hi, I am learning pmap code in FreeBSD 4.4-stable, and confused by some code, for example, in function get_ptbase, the code is: static unsigned * get_ptbase(pmap) pmap_t pmap; { unsigned frame = (unsigned) pmap-pm_pdir[PTDPTDI] PG_FRAME; /* are we current address space or kernel? */ if (pmap == kernel_pmap || frame == (((unsigned) PTDpde) PG_FRAME)){ return (unsigned *) PTmap; } /* otherwise, we are alternate address space */ if (frame != (((unsigned) APTDpde) PG_FRAME)) { APTDpde = (pd_entry_t) (frame | PG_RW | PG_V); #if defined(SMP) /* The page directory is not shared between CPUs */ cpu_invltlb(); #else invltlb(); #endif } return (unsigned *) APTmap; } - I know pm_pdir[PTDPTDI] contains page directory page's physical address, while PTDpde is a virtual address to access page directory's page directory entry which is recursivly mapped on virtual address space. question is why could (pmap-pm_pdir[PTDPTDI] PG_FRAME) and (PTDpde PG_FRAME) be same thing? a physical address = a virtual address? I am really confused by this. Any help will be appreciated, --- XuYifeng To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
domain sockets question (don't laugh)
While I've been coding for a long time, and am fairly decent at coding in the kernel, I've never really had a chance to get into sockets programming. So I thought I'd write a simple set of programs to see how things work. From what I understand, when you read on a socket, you have to do it in a loop because it won't block and wait for the total amount of data specified, while write will not return until all specified data has been written. My problem is that I've set up a read loop to read in chunks that are the size of the recv/send buffers (16384 bytes) from the socket (until the end of course, when it reads only what's left), then when I write from one program to the socket for the other program to read, the program that's writing exits with the message broken pipe while the program that's reading doesn't think there was any error, reads the amount of data it should have read (although I'm not sure if there's any data there). Can anyone tell me what's going on? Ken To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: domain sockets question (don't laugh)
* Kenneth Wayne Culver [EMAIL PROTECTED] [011023 20:22] wrote: While I've been coding for a long time, and am fairly decent at coding in the kernel, I've never really had a chance to get into sockets programming. So I thought I'd write a simple set of programs to see how things work. From what I understand, when you read on a socket, you have to do it in a loop because it won't block and wait for the total amount of data specified, while write will not return until all specified data has been written. My problem is that I've set up a read loop to read in chunks that are the size of the recv/send buffers (16384 bytes) from the socket (until the end of course, when it reads only what's left), then when I write from one program to the socket for the other program to read, the program that's writing exits with the message broken pipe while the program that's reading doesn't think there was any error, reads the amount of data it should have read (although I'm not sure if there's any data there). Can anyone tell me what's going on? You're getting SIGPIPE because the reader has closed the pipe you're trying to write to. See the signal/sigaction manpage on how to block/handle this signal. Get a copy of stevens. :) -- -Alfred Perlstein [[EMAIL PROTECTED]] 'Instead of asking why a piece of software is using 1970s technology, start asking why software is ignoring 30 years of accumulated wisdom.' http://www.morons.org/rants/gpl-harmful.php3 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: domain sockets question (don't laugh)
Hi, You have said that reader exits when there is no more data to read, and that does not necessarily mean it has read all data being written by writer. And if the reader exits before writer finishes sending all data, it will give you a broken pipe. You have to either make the no. of bytes being read by the reader equal to no. of bytes being written by writer or handle the resulting error. Anjali - Original Message - From: Kenneth Wayne Culver [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 24, 2001 6:52 AM Subject: domain sockets question (don't laugh) While I've been coding for a long time, and am fairly decent at coding in the kernel, I've never really had a chance to get into sockets programming. So I thought I'd write a simple set of programs to see how things work. From what I understand, when you read on a socket, you have to do it in a loop because it won't block and wait for the total amount of data specified, while write will not return until all specified data has been written. My problem is that I've set up a read loop to read in chunks that are the size of the recv/send buffers (16384 bytes) from the socket (until the end of course, when it reads only what's left), then when I write from one program to the socket for the other program to read, the program that's writing exits with the message broken pipe while the program that's reading doesn't think there was any error, reads the amount of data it should have read (although I'm not sure if there's any data there). Can anyone tell me what's going on? Ken To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: IPSEC sucking up memory
Shoichi Sakane wrote: While investigating a problem, I noticed that the IPSEC code is initializing the sp -- even when no one is using IPSEC. It turns out that this really, really bloats the per socket memory requirements, with the only real result being a lot of extra processing that could be replaced by a pointer is not NULL check. It seems to me that this could be handled in the TCP, UDP, and IP userreq code by only initializing the thing in the case that a policy has been set. Is there some reason why this can't be done? IPsec specification requires to consult the SPD with all of packets in order to handling the packet. it defines RFC2401. if a pointer to the entry of the SPD is NULL, it means the security policy is not defined. so the kernel consults the system wide default. it never means nothing to do. So you are saying that I could establish a global default, and make the sp pointer NULL, and have that mean use the global default, instead of copying identical policies all over the place, right? I think this would be the best approach, and it would get me all of the redundant deep copy memory back in the default case. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message