Re: FreeBSD and MacOS
On 30. Jun 2004, at 3:01, Alasdair Lumsden wrote: While Mach is derived from 4.3BSD (circa 1986~1988), there's been about 15 years worth of divergence since then. For example, FreeBSD is monolithic while Mach is more micro-kernel based. Also the driver models are quite different, eg Darwin uses IOKit (Object Oriented driver interface model). From Apple's webpages previewing Tiger: "The upgraded kernel, based on FreeBSD 5.x, provides optimised resource locking for better scalability across multiple processors, support for 64-bit memory pointers through the System library and standards-based access control lists." http://www.apple.com.au/macosx/tiger/unix.html [EMAIL PROTECTED] +41 329 41 41 41 Chris Zumbrunn Ventures - http://www.czv.com/ Internet Application Technology - Reduced to the Maximum ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
Lucas wrote: > Here's an idea.. install FreeBSD 5.2.1 and use the ports collection to > get PearPC. Then you can get a license to OSX and run it. > > I read the hardware support list, and sound doesn't even work yet in > pearpc. It might be more beneficial to buy a used Mac. I have a > FreeBSD desktop and an Ibook. OSX is very nice. There were some discussions in pearpc-devel maillist about the sound driver and I think it'll be avaible soon. -Roman Bogorodskiy pgpOD6HI71Cho.pgp Description: PGP signature
Re: FreeBSD and MacOS
Hi, Martin Olsson wrote: Hi, * MacOS X is based on FreeBSD * there is a x86 kernel for FreeBSD Does that mean I can buy a copy of MacOS X, download an x86 kernel for freeBSD, do some (or quite alot of) hacking and then get MacOS X running on my PC? take a look at the Darwin project. I realize that such hacking would be quite substantial but maybe if I forgot about audio and all that, just how much work would it be? Could it be done? Do not forget that all the things which make a Mac a Mac are still closed source. It is more like Linux. Linux alone is pretty useless without GNU, X and so on. Erich ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
In the last episode (Jun 29), zera holladay said: > > Even more interestingly, just how much code has migrated from > > Darwin to FreeBSD? Apple seems to do a lot of taking from the Open > > Source community, how much have we taken much back? > > I was wondering about this ... there was a thread not too long ago > about Darwin and FreeBSD. Somebody made the point that code seems to > go into Darwin but no code is returned. Only because few people have gone through the Darwin tree and pulled out changes. It does happen (grep for darwin in the commitlogs), but since there's no-one being paid to do it, you get much less code going in that direction. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
> Even more interestingly, just how much code has > migrated from Darwin to > FreeBSD? Apple seems to do a lot of taking from the > Open Source > community, how much have we taken much back? I was wondering about this ... there was a thread not too long ago about Darwin and FreeBSD. Somebody made the point that code seems to go into Darwin but no code is returned. It occurred to me that open source is like an ethical choice inasmuch as when one chooses the more ethical option theyre not always looking to further their own desires - sometimes they are simply shooting themselves in the foot. Is this a strong point or a weak point of open source? Im not looking to resolve an enigmatic psychological question, I was just wondering what those people who contribute to open source think. -zh __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
Alasdair Lumsden wrote: On Tue, 2004-06-29 at 21:20, Lev Walkin wrote: MacOS X is based on multiple concepts, including Darwin. Darwin is based on FreeBSD. "Darwin is based on FreeBSD" - technically, no :) Darwin is a continuation of NeXT Step which is based on the Mach kernel. While Mach is derived from 4.3BSD (circa 1986~1988), there's been about 15 years worth of divergence since then. For example, FreeBSD is monolithic while Mach is more micro-kernel based. Also the driver models are quite different, eg Darwin uses IOKit (Object Oriented driver interface model). So, its correct to say Darwin is based on NeXT Step, Mach, and 4.3BSD, but not to say it's based on FreeBSD. http://www.daemonnews.org/200010/darwin.html === cut === Darwin is based on Mach 3.0 and FreeBSD 3.2, and glued together in a very NeXT-like style. === cut === You are contradicting yourself. -- Lev Walkin [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
Hi Alasdair, (B (BAlasdair Lumsden wrote: (B (B (B>>On Wed, 2004-06-30 at 03:24, Eitarou Kamo wrote: (B>> (B>> (B> (B> (B (BAny idea? (B (B (B>> (B>> (B>> (B>>http://www.daemonnews.org/200010/darwin.html (B>> (B>> (B> (B> (B (BI see. (B (BEitarou (B (B (B (B-- (B (B*** (BEitarou Kamo (B (BTel. +81 75 7035997 (BFax +81 75 7035997 (BVoIP 050 10585997(domestic only) (Be$B!>(Bmail [EMAIL PROTECTED] (B (BFor business: (BFeel free to mail me(above), please. (B (BDonation http://www.PayPal.Com (B (BGPG FingerPrint: (B032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 (B (B (B (B (B (B (B___ (B[EMAIL PROTECTED] mailing list (Bhttp://lists.freebsd.org/mailman/listinfo/freebsd-hackers (BTo unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
I have pearpc installed from ports. I'm having trouble installing 10.1. In fact, i can't seem to get the cd to even boot at this point. Lucas Holt [EMAIL PROTECTED] FoolishGames.com (Jewel Fan Site) JustJournal.com (Free blogging) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
On Wed, 2004-06-30 at 03:24, Eitarou Kamo wrote: > Julian Elischer wrote: > >There are bits of FreeBSD in the kernel.. > >the majority of the importing has been in the userland however where > >the UNIX userland is mostly based on FreeBSD (or so I'm told) > > There seem to be some stories about Mac X. > I have read the article which mentioned that for Mac X > Apple hired a core developer of FreeBSD as the manager. > and he and his team made BSD flavor of Mac X. But I heard > Mac X is based on NetBSD, too. I'm confused a bit. > > Any idea? http://www.daemonnews.org/200010/darwin.html ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
Hi Julian or guys, Julian Elischer wrote: There are bits of FreeBSD in the kernel.. the majority of the importing has been in the userland however where the UNIX userland is mostly based on FreeBSD (or so I'm told) There seem to be some stories about Mac X. I have read the article which mentioned that for Mac X Apple hired a core developer of FreeBSD as the manager. and he and his team made BSD flavor of Mac X. But I heard Mac X is based on NetBSD, too. I'm confused a bit. Any idea? I will be back umass issue. For a while I have left it. Eitarou -- *** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e-mail [EMAIL PROTECTED] For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Setting Standby Mode for ATA Disks
On Fri, Jun 25, 2004 at 06:38:51PM +0100, Markie wrote: > - Original Message - > From: "Arne Schwabe" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, June 25, 2004 5:51 PM > Subject: Setting Standby Mode for ATA Disks > > > | Hi, > | > | is there a way to set the standby mode for ATA Disks > | > | Under linux hdparm -S seems to work: > | > |-S Set the standby (spindown) timeout for the drive. This > value is > | used by the drive to determine how long to wait (with no > disk > | activity) before turning off the spindle motor to save > power. > | Under such circumstances, the drive may take as long as 30 > sec- > | onds to respond to a subsequent disk access, though most > drives > | are much quicker. The encoding of the timeout value is > somewhat > | peculiar. A value of zero means "off". Values from 1 > to 240 > | specify multiples of 5 seconds, for timeouts from 5 > seconds to > | 20 minutes. Values from 241 to 251 specify from 1 to 11 > units > | of 30 minutes, for timeouts from 30 minutes to 5.5 > hours. A > | value of 252 signifies a timeout of 21 minutes, 253 sets a > ven- > | dor-defined timeout, and 255 is interpreted as 21 minutes > plus > | 15 seconds. > | > | I googled but I did not found anything like this for FreeBSD :/ > > Well this almost certainly doesn't help your question at all, but when I > upgraded a box from 4.x to 5.2.1 recently I found it was spinning down one > of the disks without twiddling with any settings at all. This, in turn, > appears to have caused the box to lockup/panic (can't remember now) so I > had to make a cron job that wrote to the disk every minute to stop it from > spinning down! > > I would love to know if there's some tool which can be used to just turn > this behaviour off completely! Did you try to turn it off in BIOS? -ip -- In a family recipe you just discovered in an old book, the most vital measurement will be illegible. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
Here's an idea.. install FreeBSD 5.2.1 and use the ports collection to get PearPC. Then you can get a license to OSX and run it. I read the hardware support list, and sound doesn't even work yet in pearpc. It might be more beneficial to buy a used Mac. I have a FreeBSD desktop and an Ibook. OSX is very nice. Apple actually had a build of OSX that ran on ia32 hardware before 10.0 came out. It was one of the first release canidates. Apple kept it updated through 10.1 supposedly internally in case they needed to switch to Amd or Intel processors. Instead they chose the G4 and G5 chips. Thats how darwin was ported to x86 hardware. (well i think there was a version of next for pc hardware toward the end...) I'm going to try pearpc since I have 10.1, 10.2 and 10.3 install CDs. :) On Jun 29, 2004, at 4:01 PM, Martin Olsson wrote: Hi, * MacOS X is based on FreeBSD * there is a x86 kernel for FreeBSD Does that mean I can buy a copy of MacOS X, download an x86 kernel for freeBSD, do some (or quite alot of) hacking and then get MacOS X running on my PC? I realize that such hacking would be quite substantial but maybe if I forgot about audio and all that, just how much work would it be? Could it be done? Sincerly, Martin Olsson ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" Lucas Holt [EMAIL PROTECTED] FoolishGames.com (Jewel Fan Site) JustJournal.com (Free blogging) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Article on Sun's DTrace
On Tuesday 29 June 2004 09:16 pm, Bruce M Simpson wrote: > This recently caught my eye: > http://www.samag.com/documents/s=9171/sam0406h/0406h.htm > > There are a number of good sounding suggestions in there. They gave a paper on it at USENIX ATC as well. -- John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Article on Sun's DTrace
This recently caught my eye: http://www.samag.com/documents/s=9171/sam0406h/0406h.htm There are a number of good sounding suggestions in there. BMS ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
On Wed, 30 Jun 2004, Alasdair Lumsden wrote: > On Tue, 2004-06-29 at 21:20, Lev Walkin wrote: > > MacOS X is based on multiple concepts, including > > Darwin. Darwin is based on FreeBSD. > > > "Darwin is based on FreeBSD" - technically, no :) > > Darwin is a continuation of NeXT Step which is based on the Mach kernel. > > While Mach is derived from 4.3BSD (circa 1986~1988), there's been about > 15 years worth of divergence since then. For example, FreeBSD is > monolithic while Mach is more micro-kernel based. Also the driver models > are quite different, eg Darwin uses IOKit (Object Oriented driver > interface model). > > So, its correct to say Darwin is based on NeXT Step, Mach, and 4.3BSD, > but not to say it's based on FreeBSD. > > > It would be interesting to see what percentage of Darwin is based on > 4.3BSD, Mach/NeXTStep, FreeBSD, and Apple code (ie post-NeXT > acquisition). > There are bits of FreeBSD in the kernel.. the majority of the importing has been in the userland however where the UNIX userland is mostly based on FreeBSD (or so I'm told) > Even more interestingly, just how much code has migrated from Darwin to > FreeBSD? Apple seems to do a lot of taking from the Open Source > community, how much have we taken much back? > > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
On Tue, 2004-06-29 at 21:20, Lev Walkin wrote: > MacOS X is based on multiple concepts, including > Darwin. Darwin is based on FreeBSD. "Darwin is based on FreeBSD" - technically, no :) Darwin is a continuation of NeXT Step which is based on the Mach kernel. While Mach is derived from 4.3BSD (circa 1986~1988), there's been about 15 years worth of divergence since then. For example, FreeBSD is monolithic while Mach is more micro-kernel based. Also the driver models are quite different, eg Darwin uses IOKit (Object Oriented driver interface model). So, its correct to say Darwin is based on NeXT Step, Mach, and 4.3BSD, but not to say it's based on FreeBSD. It would be interesting to see what percentage of Darwin is based on 4.3BSD, Mach/NeXTStep, FreeBSD, and Apple code (ie post-NeXT acquisition). Even more interestingly, just how much code has migrated from Darwin to FreeBSD? Apple seems to do a lot of taking from the Open Source community, how much have we taken much back? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
On Tue, Jun 29, 2004 at 10:01:49PM +0200, Martin Olsson wrote: > Hi, > > * MacOS X is based on FreeBSD > * there is a x86 kernel for FreeBSD And a lot of other sources too. Not a drop-in replacement. You can Run Mac OS X or Darwin/PPC on FreeBSD w/ PearPC ( http://pearpc.sf.net ). And it's pretty slow at this point. Nothing like running MOL on Linux on PPC. You can Run Darwin/x86 natively on your PC ( http://www.opensource.apple.com , http://www.opendarwin.org). You can Run Darwin on FreeBSD on your PC w/ Bochs or VMWare ( http://bochs.sf.net ) Why would you want to use Mac OS X w/ FreeBSD anyway? The thing about all this emulation/virtual machine stuff is that you should ask, is it worth it? I've been thinking about running multiple BSDs on one machine for development purposes. Even multibooting taught me this fiddling around is quite time consuming. > Sincerly, > Martin Olsson -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: ipfw add allow ip from @access_list1 to any in
On Wednesday 30 June 2004 03:48, [EMAIL PROTECTED] wrote: > Hello freebsd-hackers, > > > Hi, > for my own purposes I add some new features to ipfw2. > now hereis patches for 5.1 > Luigi some time ago have a look at ones, but now.. > if it is looks like interesting, get and enjoy it free > this is not a release, I stil work about it. > and I wait for 5.3 to make complete patches for 5.3. > will be pleasure for me if this will include to release... > > read first: > ftp://merlin.com.ua/pub/FreeBSD/5.1/ipfw_sid/readme > > ftp://merlin.com.ua/pub/FreeBSD/5.1/ipfw_sid/*.tgz > > disclaimer: > who downloaded it, please make backups your original files, > extract patches in new directory and look at ones first. > if you not sure that you doing, do not do anything, please. > support of that features only if ones will include in FreeBSD > and only via [EMAIL PROTECTED] > > its do like this: > > ipnt add @MY_NET 192.168.0.0/16 > ipnt add @MY_NET 195.66.199.0/24 > ipnt add @MY_NET 62.16.9.0/24 > > ipfw add 350 pipe 350 ip from any to @MY_NET out > > you can manipulate that lists without changing firewall > > ipnt del @MY_NET 0/0 > ipnt add @MY_NET 1.1.1.1 I think something like this is implemented in -current for quite some time already. Check the "LOOKUP TABLES" section of ipfw(8) and ask ru@ about his plans to transform them from numbered to named entities (as that is what your are suggesting). -- Best regards, | [EMAIL PROTECTED] Max Laier | ICQ #67774661 http://pf4freebsd.love2party.net/ | [EMAIL PROTECTED] pgpjsFCRZXPay.pgp Description: signature
Re: FreeBSD and MacOS
On Tue, Jun 29, 2004 at 10:01:49PM +0200, Martin Olsson wrote: > Hi, > > * MacOS X is based on FreeBSD > * there is a x86 kernel for FreeBSD > > Does that mean I can buy a copy of MacOS X, download an x86 kernel for > freeBSD, do some (or quite alot of) hacking and then get MacOS X running > on my PC? > > I realize that such hacking would be quite substantial but maybe if I > forgot about audio and all that, just how much work would it be? Could > it be done? Hm. Yes, that's possible. In principle, you have to write a PPC emulator to get the programs runnable, a Darwin emulation for the OS kernel [NetBSD might help there] and of course do a lot of testing. On a second thought, you might just emulate a full PPC like VmWare does. You don't really need FreeBSD for this, but having such software would be cool, so go on :) OS X is based on FreeBSD, yes. But the kernel is very different now and the greatest problems are (a) it's PPC and (b) most of the interesting stuff isn't really affected by the kernel. So if Apple would start to distribute e.g. OS X for IA32, yes, this would be a lot of work, but achievable. For PPC it surely can be done and NetBSD started something already. The biggest problem is likely to be the GUI support. Joerg > > > Sincerly, > Martin Olsson > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
Martin Olsson wrote: Hi, * MacOS X is based on FreeBSD * there is a x86 kernel for FreeBSD Does that mean I can buy a copy of MacOS X, download an x86 kernel for freeBSD, do some (or quite alot of) hacking and then get MacOS X running on my PC? I realize that such hacking would be quite substantial but maybe if I forgot about audio and all that, just how much work would it be? Could it be done? MacOS X is based on multiple concepts, including Darwin. Darwin is based on FreeBSD. To run MacOS on your platform, you would need a bulk of sources which are not freely accessible. You simply cannot "hack" Aqua or Quartz sources because there ain't any in public access. Otherwise, you could just install Darwin, it will run on your PC without any hacking. -- Lev Walkin [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: FreeBSD and MacOS
In message: <[EMAIL PROTECTED]> Martin Olsson <[EMAIL PROTECTED]> writes: : Does that mean I can buy a copy of MacOS X, download an x86 kernel for : freeBSD, do some (or quite alot of) hacking and then get MacOS X running : on my PC? No. MacOS X is for PowerPC, not Intel. Also, the FreeBSD kernel and Darwin kernels are somewhat different. Warner ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
FreeBSD and MacOS
Hi, * MacOS X is based on FreeBSD * there is a x86 kernel for FreeBSD Does that mean I can buy a copy of MacOS X, download an x86 kernel for freeBSD, do some (or quite alot of) hacking and then get MacOS X running on my PC? I realize that such hacking would be quite substantial but maybe if I forgot about audio and all that, just how much work would it be? Could it be done? Sincerly, Martin Olsson ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
802.1x for FreeBSD
I proudly anounce that I've managed to make a workable port of open1x xsupplicant for FreeBSD :) I don't actually have a wireless card, and only nead it in 'wired' mode (e.g. over ethernet), so the wireless bits almost certainly won't work. Anyway, the patch is at http://www.sharanet.org/~ivoras/xsupplicant.patch.gz and there are some notes at http://www.sharanet.org/~ivoras/open1x.html Thanks to everyone who helped with their advice! -- What part of "Ph'nglui mglw'nath Cthulhu R'lyeh wgah'nagl fhtagn" don't you understand? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Peeking BPF
Ivan Voras wrote: I need to convert this code: ret = recvfrom(thisint->sockInt, &resultframe, 1520, MSG_PEEK, 0, 0); if (ret > 0) return TRUE; to use BPF. Essentialy, how to find out if a packet is available over the BPF interface? try to read() it and read() will hang there until there is data in it. alternatively, use poll() or select() to check for readability event. char resultBuffer[65536]; ret = read(thisint->bpfInt, resultBuffer, sizeof(resultBuffer)); if(ret > 0) return TRUE; -- Lev Walkin [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: PCI memory alloc..!
In message: <[EMAIL PROTECTED]> "Auge Mike" <[EMAIL PROTECTED]> writes: : While I was trying to track to find out how a device alloc a new memory : resource, I have been little confused on finding out how the new PCI device : can deal with a case when the activation calls pmap_mapdev : : What I need to understand that what will happen if pmap_mapdev allocated a : new space that dose not match what is expected by the device and determined : by r_start and r_end ?? The pci bus deals with allocating and mapping the memory. Getting the bus handle and bus tags will let you access it via the bus_space routines or the bus_dma routines. pmap_mamdev is done under the covers and you'll not need to worry about such things. Warner ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
ipfw add allow ip from @access_list1 to any in
Hello freebsd-hackers, Hi, for my own purposes I add some new features to ipfw2. now hereis patches for 5.1 Luigi some time ago have a look at ones, but now.. if it is looks like interesting, get and enjoy it free this is not a release, I stil work about it. and I wait for 5.3 to make complete patches for 5.3. will be pleasure for me if this will include to release... read first: ftp://merlin.com.ua/pub/FreeBSD/5.1/ipfw_sid/readme ftp://merlin.com.ua/pub/FreeBSD/5.1/ipfw_sid/*.tgz disclaimer: who downloaded it, please make backups your original files, extract patches in new directory and look at ones first. if you not sure that you doing, do not do anything, please. support of that features only if ones will include in FreeBSD and only via [EMAIL PROTECTED] its do like this: ipnt add @MY_NET 192.168.0.0/16 ipnt add @MY_NET 195.66.199.0/24 ipnt add @MY_NET 62.16.9.0/24 ipfw add 350 pipe 350 ip from any to @MY_NET out you can manipulate that lists without changing firewall ipnt del @MY_NET 0/0 ipnt add @MY_NET 1.1.1.1 sid_at_merlin.com.ua ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Peeking BPF
I need to convert this code: ret = recvfrom(thisint->sockInt, &resultframe, 1520, MSG_PEEK, 0, 0); if (ret > 0) return TRUE; to use BPF. Essentialy, how to find out if a packet is available over the BPF interface? -- What part of "Ph'nglui mglw'nath Cthulhu R'lyeh wgah'nagl fhtagn" don't you understand? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
No flames please: Linux mknod compatibilty
Hi everybody, First of all, please copy all answers back to me, since I am not anymore subscribed to -hackers. (Panic: time fault) I´ve done some changes to the kernel mknod(2) handling to make it more compatible to the Linux behaviour, allowing one to create files of type VREG, VSOCK and VFIFO with mknod(2). I already know that BSD way is that one should use creat(2), bind(2) and mkfifo(2) functions for these, but, if all these are indeed vnodes, why bother if one use mkfifo(2) or mknod(2) to create fifos?? The only vnode type I think I left out is VDIR, because it needs to be initialized with "." and "..". I first came with this idea using rsync for a full backup, noticing it could not copy fifos or sockets. I could simply fix rsync, but I thought "fixing" FreeBSD would be a little bit funnier! ;-) To allow your appreciation, here are my patches. I am not an expert in VFS coding, so it should probably be checked by an expert before commiting. All I can say is that it worked for me. I'll submit a PR after this email, to make it faster to commit.;-) 8<8<8<8<8<8<8< --- RELENG_4/src/sys/kern/vfs_syscalls.c.orig Mon Jun 28 18:11:58 2004 +++ RELENG_4/src/sys/kern/vfs_syscalls.cMon Jun 28 19:26:31 2004 @@ -1187,14 +1187,20 @@ register struct vnode *vp; struct vattr vattr; int error; - int whiteout = 0; + int vtype; struct nameidata nd; - switch (SCARG(uap, mode) & S_IFMT) { + vtype = SCARG(uap, mode) & S_IFMT; + switch ( vtype ) { case S_IFCHR: case S_IFBLK: error = suser(p); break; + case S_IFREG: + case S_IFIFO: + case S_IFSOCK: + error = 0; + break; default: error = suser_xxx(0, p, PRISON_ROOT); break; @@ -1202,7 +1208,7 @@ if (error) return (error); bwillwrite(); - NDINIT(&nd, CREATE, LOCKPARENT, UIO_USERSPACE, SCARG(uap, path), p); + NDINIT(&nd, CREATE, LOCKPARENT, (vtype==S_IFSOCK)?UIO_SYSSPACE:UIO_USERSPACE, SCARG(uap, path), p); if ((error = namei(&nd)) != 0) return (error); vp = nd.ni_vp; @@ -1212,9 +1218,8 @@ VATTR_NULL(&vattr); vattr.va_mode = (SCARG(uap, mode) & ALLPERMS) &~ p->p_fd->fd_cmask; vattr.va_rdev = SCARG(uap, dev); - whiteout = 0; - switch (SCARG(uap, mode) & S_IFMT) { + switch ( vtype ) { case S_IFMT:/* used by badsect to flag bad sectors */ vattr.va_type = VBAD; break; @@ -1224,8 +1229,17 @@ case S_IFBLK: vattr.va_type = VBLK; break; + case S_IFREG: + vattr.va_type = VREG; + break; + case S_IFSOCK: + vattr.va_type = VSOCK; + break; + case S_IFIFO: + vattr.va_type = VFIFO; + break; case S_IFWHT: - whiteout = 1; + /* NOTHING */ break; default: error = EINVAL; @@ -1234,9 +1248,18 @@ } if (!error) { VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE); - if (whiteout) + switch ( vtype ) { + case S_IFWHT: error = VOP_WHITEOUT(nd.ni_dvp, &nd.ni_cnd, CREATE); - else { + break; + case S_IFREG: + case S_IFSOCK: + error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, + &nd.ni_cnd, &vattr); + if (error == 0) + vput(nd.ni_vp); + break; + default: error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); if (error == 0) 8<8<8<8<8<8<8< And here is a small test program, ran on both Linux and FreeBSD: 8<8<8<8<8<8<8< #include #include #include #include #include main() { mknod( "test1", S_IFSOCK|0777, 0 ); perror( "mknod" ); errno=0; mknod( "test2", S_IFIFO|0777, 0 ); perror( "mknod" ); errno=0; mknod( "test3", S_IFREG|0777, 0 ); perror( "mknod" ); errno=0; mknod( "test4", S_IFBLK|0777, 0 ); perror( "mknod" ); errno=0; mknod( "test5", S_IFCHR|0777, 0 ); perror( "mknod" ); errno=0; } 8<8<8<8<8<8<8< _
Re: A few technical items on UFS2 and snapshots...
Joe Schmoe <[EMAIL PROTECTED]> wrote: > Oliver Fromme <[EMAIL PROTECTED]> wrote: > > Joe Schmoe <[EMAIL PROTECTED]> wrote: > > > 1. Is it dangerous to mount all 20 possible > > > filesystem snapshots and > > > _leave them mounted_ to use at any time ? > > > > I don't think there is any danger, except that you > > will run > > out of disk space sooner or later. > > Every snapshot I have taken so far takes up zero space > on the drive, or at least that is what `df` is telling > me ... Well, right after you have taken the snapshot, it doesn't require any additional space, because it contains just the same data as the original filesystem. Similar to a hard- link which doesn't take any addition disk space either. But as soon as you start modifying the filesystem _after_ you have taken the snapshot, the snapshot will begin to take up space on its own. For example, when you delete a file, then its space will not actually be freed, but taken over by the snapshot, because it still has to exist in the snapshot -- you will not actually free any physical space. Remember that the snapshot is supposed to contain the data from the time when it was created. Similar things happen when you modify a file: When you, say, change a few bytes in a file, then the disk block with the _old_ contents is copied and given to the snap- shot -- then the modification is written to the original disk block. That mechanism is called copy-on-write. It means that your snapshot's space requirement is growing all the time. Removing files does not free any space, and modifying files in fact reduces the free space, even if your modification don't actually increase the size of the file. > > > What about > > > automatically mounting all 20 snapshots at boot > > > time ? > > > > Sorry, I fail to see what exactly you're trying to > > achieve. > > Why would you want to do that? > > I dunno - just to have all the snapshots mounted so > that if I want to access one, I don't have to take the > time to mount it up. I'm just lazy, I guess ... so > there would be no ill effects of doing this ? No -- except, as I said, you'll run out of disk space, sooner or later. Under normal circumstances snapshots don't live for an extended period of time. Typical uses include: - Background fsck. This is done automatically during boot without you having to do anything. - Secure dump. You can take a snapshot and them dump it, which is better than dumping a live filesystem. - Short term backup. You can set up a cron which creates and removes (i.e. "rotates") snapshots in certain inter- vals, e.g. once per hour. This can protect against accidental "rm" commands -- just copy the lost file back from the most recent snapshot. However, I fail to see why you would want to make 20 fixed snapshots, automatically mount them during boot and keep those same snapshots mounted forever. > > > 2. Related to the first question, it seems like I > > > am getting space > > > out of nowher e ... that is, if I fill up a > > > drive, then make a > > > snapshot, then erase the drive and fill it again, > > > > You cannot fill it up again, because the snapshot > > still > > takes up all the space. When you fill the drive and > > make > > a snapshot, erasing the drive will not free any > > space. > > Is this really true ? Yes. See above. > Where did you read this ? Uhm, I think I read it 10 years ago in the manual of a NetApp Filer. :-) FreeBSD's snapshots work very similar to those of the NetApps. > if the snapshot files all take > up the same amount of space as the filesystem itself, It does't. First it takes zero space. When modifying the original filesystem, the space of the snapshot grows. > but `df` does not show an increase in space when I > make a snapshot, how do I tell what is _really_ going > on ? "df" displays the current size of the snapshot (which is zero in the beginning) and the total size of the original filesystem, which includes any snapshots. > > > 3. When I mount a snapshot, as described in the > > > man page, but then > > > later mount - uw the snapshot ( to make that a > > > writeable mount) and, > > > say, touch a file or create a file in the mounted > > > snapshot ... what > > > exactly am I doing ? > > > > You're getting EPERM ("operation not permitted"), > > because > > snapshots are always read-only. > > No, I'm not. Re-read the question - I am saying that > after I mount the snapshot, I then remount it with > -uw, making it writeable (with `mount -uw`), and then > I can _successfully_ touch files inside that snapshot. Have you actually tried that? And did the touched file appear within the snapshot? I don't think so. Note that you might be able to remount the snapshot with -uw, but it doesn't actually change anything. You still cannot write to it. You can also mount a CD-ROM (cd9660) read/write -- and yes, I have tried this. ;-) You do
Re: Getting MAC address?
On Sat, Jun 26, 2004 at 11:15:45AM +0200, Ivan Voras wrote: > > I was looking at it and came across getifaddrs(). This function does not > depend on a open socket (yes, mine is AF_LINK, sockaddr_dl), and > apparently returns a list of all interfaces. Is there really no other > way than to traverse this list? Back on the days of using FreeBSD 4.6-Release, i once wrote a simple program to get MAC address of a specified NIC. I tested it on -current just now. Still works fine. =) /* * getmac.c * * Simple Demo:Get MAC address of a specified NIC on FreeBSD * * To compile: gcc getmac.c -o getmac * * Tested on FreeBSD-4.6 RELEASE & FreeBSD-5.2-current */ #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char *argv[]) { int mib[6], len; char*buf; unsigned char *ptr; struct if_msghdr*ifm; struct sockaddr_dl *sdl; if (argc != 2) { fprintf(stderr, "Usage: getmac \n"); return 1; } mib[0] = CTL_NET; mib[1] = AF_ROUTE; mib[2] = 0; mib[3] = AF_LINK; mib[4] = NET_RT_IFLIST; if ((mib[5] = if_nametoindex(argv[1])) == 0) { perror("if_nametoindex error"); exit(2); } if (sysctl(mib, 6, NULL, &len, NULL, 0) < 0) { perror("sysctl 1 error"); exit(3); } if ((buf = malloc(len)) == NULL) { perror("malloc error"); exit(4); } if (sysctl(mib, 6, buf, &len, NULL, 0) < 0) { perror("sysctl 2 error"); exit(5); } ifm = (struct if_msghdr *)buf; sdl = (struct sockaddr_dl *)(ifm + 1); ptr = (unsigned char *)LLADDR(sdl); printf("%02x:%02x:%02x:%02x:%02x:%02x\n", *ptr, *(ptr+1), *(ptr+2), *(ptr+3), *(ptr+4), *(ptr+5)); return 0; } Reference: UNP v1. Section 17.5 Hope this helps. -- Alecs King ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
PCI memory alloc..!
Hi all, While I was trying to track to find out how a device alloc a new memory resource, I have been little confused on finding out how the new PCI device can deal with a case when the activation calls pmap_mapdev What I need to understand that what will happen if pmap_mapdev allocated a new space that dose not match what is expected by the device and determined by r_start and r_end ?? Yours, _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Wacom Graphire3 USB Tablet and FreeBSD
On Mon, 12 Jan 2004 10:29:39 +0100 Arvid <[EMAIL PROTECTED]> wrote: > Hello people, > > I have a bit of a problem to get my Wacom Graphire3 (USB) to work > with FreeBSD. At first I thought I was doing something wrong, but it > seems that FreeBSD doesnt understand it. I know it works with > OpenBSD and NetBSD, and that it probably is due to uhid.c > http://fxr.watson.org/fxr/source/dev/usb/uhid.c?v=RELENG51 > I was really surprised that it works on the two other BSDs, if I had > known that before I probably would've installed one of them. But now > my FreeBSD is pretty much set up(about everything else works now), > so I give it another try. > > It only works since about 1-2 weeks on NetBSD, I found the story > behind that, and wrote the guy responsible for that about it. He > gave me some hints, you can find what he wrote, and what I tried > before in (and it the parent message) > Message-ID: <[EMAIL PROTECTED]> > or on google: > http://groups.google.com/groups?selm=slrnbvrd54.9hq.nospam%40hennep.adsl.utwente.nl > > What I want to know is, is it possible to just replace the uhid.c > from FreeBSD by the one from Net- or OpenBSD? I dont think so, but > if so, thats an easy try. > > Otherwise I'm looking for someone that knows C, and wants to look at > > uhid.c. I obviously dont know C, nor any other programming language. > If its probably a better idea to install OpenBSD, I'd like to hear > that too ;-) Ever get it working or find a tablet that does work under FreeBSD? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"