determine the nic pairs

2012-07-18 Thread Deepak Kumar
Hi Enthusiast,

I have a server which has around 20 nic interfaces.
Some are connected port to port via cross cable and some are connected via
a switch and few are not connected.
(Let consider all are connected port to port)
I want to find out the way so that I can determine the pairs efficiently.

I assigned ip starting from 172.x.x.30 with netmask 255.255.255.0
I created as many sockets as there are interfaces with
socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
then I bind the all but one interfaces to the ip I gave using
bind(sockfd, (struct sockaddr *)&in, sizeof(in));
where in is something like
bzero(&in, sizeof(in));
in.sin_family = AF_INET;
in.sin_port = htons(2074);
in.sin_addr.s_addr = inet_addr("172.x.x.30+interfaceno");

and one left socket I did
socket creation and using setsockopt I did
int option = 1;
setsockopt(sockfd[counter], SOL_SOCKET, SO_BROADCAST, &option,
sizeof(option));
and do
sendto(sockfd, arr, sizeof(arr), 0, (struct sockaddr *)&in, len);
where in is
bzero(&in, sizeof(in));
in.sin_family = AF_INET;
in.sin_port = htons(2074);
in.sin_addr.s_addr = inet_addr(172.x.x.255);

Now I want to send the packet from one interface and who ever receive
should be its partner.
But when I do recvfrom for one socket it blocks and I am not able to
implement timeout for it.
select is not working as it need file discripter and socket call is
returning struct socket.
So how should I implement timeout in recvfrom or use there exist some
equivalent of select for struct socket
or any other way to implement this.

PS: Ping is working fine in determining the pair but taking to much time.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Apache vs. nginx

2012-07-18 Thread Wojciech Puchar
I'm the admin for a small hobby website (Stovebolt.com - about 7 million 
hits/mo).  We're fixin to buy a new server, and since I have to start from 
scratch (install FreeBSD and all the needed ports), I'm wondering if anyone 
on this list has switched from Apache to nginx.


it depends of your needs.
with lot traffic website (your classify as that) it doesn't matter really.
apache do some things that nginx doesn't, like .htaccess, no idea if you 
need them or not.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How to donate code

2012-07-18 Thread Виталий Туровец
2012/7/18 Eitan Adler :
> On 17 July 2012 02:16, Виталий Туровец  wrote:
>> Hello, colleagues!
>> How would one propose some code to current branch?
>> I've made a little change to ifconfig ( a switch to display IPv4
>> network masks in CIDR format instead of HEX) and want to suggest this
>> change to FreeBSD project.
>> Also i've created a PR with my patch describing what is done and for
>> what (http://www.freebsd.org/cgi/query-pr.cgi?pr=169072&cat=), but
>> maybe there's some other way to somehow push this code for review by
>> FreeBSD developers?
>> Thank you a lot and sorry for noobish question :)
>
> The general advice is mail the patch to -hackers for review. If you
> don't get a reply or if people like it, submit a PR so it doesn't get
> lost. Be aware that the latency for some patches could be longer than
> you expect. :(

I already realize that :(

> FWIW "unified diff" format patches are much preferred. (diff -u)

Okay, i'll rewrite this code under -current OS build and mail the
"unified diff" patch to -hackers list.
Thank you all people!

>
> --
> Eitan Adler



-- 




~~~
WBR,
Vitaliy Turovets
Systems Administrator
Corebug.Net
+38(093)265-70-55
VITU-RIPE
X-NCC-RegID: ua.tv
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Wine-fbsd64 updated to 1.5.9 (32bit Wine for 64bit FreeBSD)

2012-07-18 Thread David Naylor
Hi,

Packages [1] for wine-fbsd64-1.5.9 have been uploaded to mediafire [2].  The 
packages for FreeBSD 10 use the pkgng* [3] format.  

There are many reports that wine does not work with a clang compiled world
(help in fixing this problem is appreciated as it affects quite a few users).

The patch [4] for nVidia users is now included in the package and is run on
installation (if the relevant files are accessible).  Please read the
installation messages for further information.

Regards,

David

[1]
 MD5 (wine-1.5.x-freebsd8/wine-fbsd64-1.5.9,1.tbz) = 
dddaceda7c0dedd03e5f8531d9826966
 MD5 (wine-1.5.x-freebsd9/wine-fbsd64-1.5.9,1.txz) = 
aec8afccdd6ac6928662d3be5f537195
 MD5 (wine-1.5.x-freebsd10/wine-fbsd64-1.5.9,1.txz) = 
9436b443844ac8bf52d9ead2de55cf33
[2] http://www.mediafire.com/wine_fbsd64
[3] http://wiki.freebsd.org/pkgng
[4] The patch is located at /usr/local/share/wine/patch-nvidia.sh
* pkgng support for nVidia patching should be working properly and using a 
mixed mode between pkgng and pkg also works


signature.asc
Description: This is a digitally signed message part.


Re: Apache vs. nginx

2012-07-18 Thread Kevin Wilcox
On Jul 18, 2012 5:19 AM, "Wojciech Puchar" 
wrote:
>>
>> I'm the admin for a small hobby website (Stovebolt.com - about 7 million
hits/mo).  We're fixin to buy a new server, and since I have to start from
scratch (install FreeBSD and all the needed ports), I'm wondering if anyone
on this list has switched from Apache to nginx.
>
>
> it depends of your needs.

This is a fantastic statement (I'm being serious, not facetious), because
it really does.

For specific purposes - serving static content with few bells and whistles,
dedicated PHP application servers for custom apps and stuff like Drupal, I
can't see ever going back to Apache. The nginx configs are too clean and
too simple.

For a large site with more complex authentication and access restriction
needs that are handled by the web server, I wouldn't drift from Apache -
not because I think nginx couldn't handle it but because I don't know if it
could and because I am less comfortable with saying I did it properly with
nginx than saying the same thing about Apache.

kmw
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Apache vs. nginx

2012-07-18 Thread Damien Fleuriot

On 7/17/12 4:40 PM, Paul Schmehl wrote:
> I'm the admin for a small hobby website (Stovebolt.com - about 7 million
> hits/mo).  We're fixin to buy a new server, and since I have to start
> from scratch (install FreeBSD and all the needed ports), I'm wondering
> if anyone on this list has switched from Apache to nginx.
> 
> If you have, what has your experience been like?  Was the change
> relatively easy?  (I'm not intimidated by technical details.  I've been
> running FreeBSD on these servers for about 12 years now.)  Was the
> performance better?  (We've not been having any problems with Apache to
> this point.) Is there sufficient support from addon apps to run a site
> with a php-driven forum?
> 


I have.



1/ regarding the difficulty of the switch

It depends on whether or not you're running code parsing programs like
CGI and PHP.

It also depends on whether or not you're using apache rewrite rules.



2/ regarding performance

I'm much more satisfied by nginx than I was by apache.
I find it runs smoother, it's not vulnerable to slowloris...



3/ regarding functionality

In constrast with Wojciech Puchar's email, I'd like to point out that
while nginx doesn't support .htaccess files, you can still customize
your vhosts to add authentication and such.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: fsck on FAT32 filesystem?

2012-07-18 Thread Robert Bonomi
> From owner-freebsd-questi...@freebsd.org  Tue Jul 17 12:06:29 2012
> Date: Tue, 17 Jul 2012 19:02:19 +0200 (CEST)
> From: Wojciech Puchar 
> To: Robert Bonomi 
> Cc: freebsd-questions@freebsd.org
> Subject: Re: fsck on FAT32 filesystem?
>
> >>
> >>
> >>> Surely SpinRite is "more clever" than that,
> >> i would bet otherwise. simple tools and free tools are always better
> >
> > You continue to demonstrate that you "don't know what you don't know".
>
> are you another sponsored by some "recovery tool" commercial producer?

What I am is an information systems professional with 45 years experience.
including 30 years with Unix, who does not suffer ignorant, ill-informed,
and arrogant, fools gladly.

You make pronouncements of your *opinions* as though they are God-given 
fact -- even on things which you _don't_ have actual knowledge.  You're 
entitled to have opinions, *BUT* the "Gospel According to Wojciech" is -not- 
'the answer' for everybody, in every situation. *IF* you ever learn that, 
realize that there _are_ other =legitimate= viewpoints on matters, and
qualify your statements with things like 'in my opinion', 'this might
help', 'have you considered trying' -- as opposed to dictating what the
reader must do, *especially* when you have missed critical facts in
the question you are responding to -- Then, and *ONLY*THEN*, are people 
likely to give your opinions about how to do things any serious consideration.

Case in point, your "I would bet otherwise" -- an implicit admission you
*don't* know how SpinRite actually works.  How much hard cash, US dollars,
do you have to 'put your money where your mouth is"?   Alternatively, you
can admit you were blowing bullshit -- that your words were merely
uninformed speculation, with no actual basis in fact.


As for my subject-expertise -- I have, personally, _written_ stand-alone code
that directly interfaces with hard-controller disk chips -- for purposes of 
evaluating the condition of damaged hard-disks.  I've had clients come to 
me for advice on data-recovery, having suffered catastrophic damage to their 
only copy of what was truly 'mission critical' data. (No, they weren't
existing clients -- if they had been, proper back-up procedures would have
been in place, and the disk crash would have been a 'non-event'.)

I have successfully recovered _every_byte_ of data from a damaged "State of 
The Art Compression" compressed disk volume, using custom device-driver code
that I wrote.

I've had clients that decided it WAS 'worth it' to pay one of the 'kilobuck
per megabyte of recovered data' (actual price) "Class 25 clean room" recovery
services -- where the damage to the drive was such that *ANY* attempt to
access anything on the drive would cause more damage.  Using "'simple, free
tools", like your 'dd' recommendation,  would (a) not have been successful,
and (b) *greatly* reduced what would be recoverable by the clean-room facility.

Your assertation that "free tools are always better" is pure, unadulterated
bullshit.  For 'simple' situations, they _may_ be adequate, or may not.

When there are various kinds of _serious_ problems, even -attempting- to 
use tools like 'dd' (or SpinRite, for that matter) can/will make things 
FAR worse.  Drive disassembly and platter cleaning _must_ be the first t
hing done in such situations.

_For_the_price_, SpinRite provides an amazing level of functionality. circa 
85-90% of what high-end professional tools costing 100x more can do.  It's 
not a FUS, but it is incredible 'bang for the buck', and does things that
*NO* Unix 'userland' application can do in reconstructing damaged data.
SpinRite _will_ recover data in a lot of situations where the 'dd' approach
is "less than effective".  Situations where SpinRite is ineffective, _and_
the "clean room" approach is _not_ required, are rare.  It's not perfect,
it won't fix "everything", but it is an incredibly inexpensive step up
(and a *LARGE* step up) from the 'dd' approach.  If the 'dd' type approach
you you recover 'what you need' that's great.  If _not_, SpinRite should
probably be the 'next step'.  If it _doesn't_ work, the cost/time for
trying it is 'inconsequential petty cash', elative to the cost of the _next_
approach.  And, if it -does- work, it paid for itself, a hundred times over,
by saving the cost of the really expensive approach.  "Cheap insurance'
even at several times the retail price.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Cooperation

2012-07-18 Thread Anton Konnov (AdCash.com)

Hello,

I represent advertising agency Adcash.com and I would like to offer you 
co-operation with us. WE have a variety of ad format to monetize your 
international traffic using CPM payouts.


Please contact with me by email: an...@adcash.com or feel free to add me 
directly in Skype: anton.adcash  and we will discuss all in details.


Looking forward hearing from you,
Anton Konnov


--
Country Manager

Cell: +372-5543650
Landline: +372-7120566
Skype: anton.adcash

Adcash OÜ
Kaupmehe 7-A10 10114 Tallinn, Estonia
VAT-ID: EE101470034

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Invalid GPT backup header

2012-07-18 Thread dweimer

On 2012-07-09 15:11, dweimer wrote:

I have had a few virtual machine installations come up with "gptboot:
invalid GPT backup header" error message while booting. (some
immediately on first boot after install) They still boot fine, and 
run

without problems, but I would like to find a way to fix the problem.
Does anyone know how you can write a new GPT backup header to the
partition table.  I have even gone to the extent of adding a second
virtual disk, using gpart to create a partition table and then add 
new

partitions and setup bootstrap then use cpio to copy data over and
switched the drive SCSI IDs within the virtual machines configuration
to boot from the second drive instead.  Still same error message when
booting off the new drive.  I did however leave out the size option
when creating the last UFS partition so it may have filled to the end
and overwrote the backup GPT table.

I have searched online for a solution to recreating the backup GPT
header from the main header, but I have been unable to find anything.
Not sure if I am missing something simple, if no one else has had 
this

problem, or if others are just ignoring it since their system works
even with it?  All the machines with the problem are VMware hosted
machines, some on ESX, and some on VMware Workstations.


Just a quick update in case someone else runs into this and finds this 
thread, this problem maybe related to a quirk of some sort in the older 
version of VMware workstation I am running on my work laptop its running 
version 6.5 (can't get boss to approve upgrade as the other admins have 
just decided its better to test on the ESX servers instead of their 
local machines, which I don't agree with) I had an urgent need to use a 
this machine to put a temporary work around in place on another problem 
and used vmware converter to migrate it from my workstation to the ESX 
servers.  No more invalid backup GPT message when booting the one copy 
on the ESX servers.  I am going to manually copy the files for this VM 
to the version 8 workstation installation on my home machine and see if 
that one does or doesn't show the warning on boot, to attempt to better 
narrow down this cause.


--
Thanks,
   Dean E. Weimer
   http://www.dweimer.net/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: fsck on FAT32 filesystem?

2012-07-18 Thread Jerry
On Wed, 18 Jul 2012 07:47:02 -0500 (CDT)
Robert Bonomi articulated:

> > From: Wojciech Puchar 
> >
> > >>> Surely SpinRite is "more clever" than that,
> > >> i would bet otherwise. simple tools and free tools are always
> > >> better
> > >
> > > You continue to demonstrate that you "don't know what you don't
> > > know".
> >
> > are you another sponsored by some "recovery tool" commercial
> > producer?
> 
> What I am is an information systems professional with 45 years
> experience. including 30 years with Unix, who does not suffer
> ignorant, ill-informed, and arrogant, fools gladly.
> 
> You make pronouncements of your *opinions* as though they are
> God-given fact -- even on things which you _don't_ have actual
> knowledge.  You're entitled to have opinions, *BUT* the "Gospel
> According to Wojciech" is -not- 'the answer' for everybody, in every
> situation. *IF* you ever learn that, realize that there _are_ other
> =legitimate= viewpoints on matters, and qualify your statements with
> things like 'in my opinion', 'this might help', 'have you considered
> trying' -- as opposed to dictating what the reader must do,
> *especially* when you have missed critical facts in the question you
> are responding to -- Then, and *ONLY*THEN*, are people likely to give
> your opinions about how to do things any serious consideration.
> 
> Case in point, your "I would bet otherwise" -- an implicit admission
> you *don't* know how SpinRite actually works.  How much hard cash, US
> dollars, do you have to 'put your money where your mouth is"?
> Alternatively, you can admit you were blowing bullshit -- that your
> words were merely uninformed speculation, with no actual basis in
> fact.
> 
> As for my subject-expertise -- I have, personally, _written_
> stand-alone code that directly interfaces with hard-controller disk
> chips -- for purposes of evaluating the condition of damaged
> hard-disks.  I've had clients come to me for advice on data-recovery,
> having suffered catastrophic damage to their only copy of what was
> truly 'mission critical' data. (No, they weren't existing clients --
> if they had been, proper back-up procedures would have been in place,
> and the disk crash would have been a 'non-event'.)
> 
> I have successfully recovered _every_byte_ of data from a damaged
> "State of The Art Compression" compressed disk volume, using custom
> device-driver code that I wrote.
> 
> I've had clients that decided it WAS 'worth it' to pay one of the
> 'kilobuck per megabyte of recovered data' (actual price) "Class 25
> clean room" recovery services -- where the damage to the drive was
> such that *ANY* attempt to access anything on the drive would cause
> more damage.  Using "'simple, free tools", like your 'dd'
> recommendation,  would (a) not have been successful, and (b)
> *greatly* reduced what would be recoverable by the clean-room
> facility.
> 
> Your assertation that "free tools are always better" is pure,
> unadulterated bullshit.  For 'simple' situations, they _may_ be
> adequate, or may not.
> 
> When there are various kinds of _serious_ problems, even -attempting-
> to use tools like 'dd' (or SpinRite, for that matter) can/will make
> things FAR worse.  Drive disassembly and platter cleaning _must_ be
> the first t hing done in such situations.
> 
> _For_the_price_, SpinRite provides an amazing level of functionality.
> circa 85-90% of what high-end professional tools costing 100x more
> can do.  It's not a FUS, but it is incredible 'bang for the buck',
> and does things that *NO* Unix 'userland' application can do in
> reconstructing damaged data. SpinRite _will_ recover data in a lot of
> situations where the 'dd' approach is "less than effective".
> Situations where SpinRite is ineffective, _and_ the "clean room"
> approach is _not_ required, are rare.  It's not perfect, it won't fix
> "everything", but it is an incredibly inexpensive step up (and a
> *LARGE* step up) from the 'dd' approach.  If the 'dd' type approach
> you you recover 'what you need' that's great.  If _not_, SpinRite
> should probably be the 'next step'.  If it _doesn't_ work, the
> cost/time for trying it is 'inconsequential petty cash', elative to
> the cost of the _next_ approach.  And, if it -does- work, it paid for
> itself, a hundred times over, by saving the cost of the really
> expensive approach.  "Cheap insurance' even at several times the
> retail price.

I couldn't have said it better myself. Wojciech lives in his own little
world, which is fine as long as he doesn't try to visit mine. He sounds
like he works at a small Polish SMB, more commonly referred to as a
SOHO in more developed countries. I have just blocked him so I don't
have to read his TROLLish bullshit. The fact that he mentioned
"scandisk" which Microsoft only released in Microsoft Windows
Millennium Edition, Microsoft Windows 98 Standard Edition and Microsoft
Windows 98 Second Edition makes one wonder just how current he is with
modern operating systems and 

Re: fsck on FAT32 filesystem?

2012-07-18 Thread Julian H. Stacey
Hi Robert,
cc questions@
cc postmaster@ (***)

> What I am is an information systems professional with 45 years experience.

Interesting reading that & your prior post.
'Edge of the track, & turn up the op. amps' 
has been an interesting technique for decades, I
first read of it maybe 70's or 80's ?  I bet some,
eg in government or private espionage, & desperate
incompetent bankers, & their employed service firms,
probably had fun seeing what was possible. (Envy ;-)

BTW I too wrote a recoverer way back, just for floppies
http://berklix.com/~jhs/src/bsd/jhs/bin/public/valid/
Worked very well, recovered data while wearing
media out.  I ported it to FreeBSD, but it was
never as good there, I never hacked BSD drivers to
support it to do bit averaging if all CRCs failed.

(***) Re.:
Wojciech Puchar 
People could ask
 (cc'd)
to block troll Wojciech Puchar.  His blinkered noise pollutes too often,
while too many have failed to reason with him, on too many subjects on
questions@ & hackers@.  I & someone on hackers@ already filter out his noise.
http://berklix.com/~jhs/dots/.procmailrc.lists

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
 Reply below not above, cumulative like a play script, & indent with "> ".
 Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.
 Mail from Yahoo & Hotmail dumped @Berklix.  http://berklix.org/yahoo/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: fsck on FAT32 filesystem?

2012-07-18 Thread Jakub Lach
-offtopic-

(...)

> like he works at a small Polish SMB, more 
> commonly referred to as a  SOHO in more 
> developed countries.

Not really sure what you wanted to imply, 
as "SMB" looks like americanism to me. 

--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/fsck-on-FAT32-filesystem-tp5727015p5728037.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: fsck on FAT32 filesystem?

2012-07-18 Thread Robert Bonomi

> Date: Wed, 18 Jul 2012 17:58:22 +0200
> From: "Julian H. Stacey" 
> Subject: Re: fsck on FAT32 filesystem? 
>
> Hi Robert, cc questions@ cc postmaster@ (***)
>
> > What I am is an information systems professional with 45 years 
> > experience.
>
> Interesting reading that & your prior post.
>  'Edge of the track, & turn up the op. amps'
>   has been an interesting technique for decades, I first read of it maybe 
>   70's or 80's ?  I bet some, eg in government or private espionage, & 
>   desperate incompetent bankers, & their employed service firms, probably 
>   had fun seeing what was possible. (Envy ;-)

All I'm going to say is:
  1) There's a _reason_ the gov't requires hard drives with anthing higher 
 than 'somewhat' classified data on them to be =physically= destroyed 
 before leving the secure area.
  2) As of 2007, 'over-writing' data (regardless of how many times) is *not*
 sufficient, any more, for _any_ military purposes.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"



for the impatient: Linux LibreOffice works on FreeBSD

2012-07-18 Thread Vaclav Kadlcik
Hi,

since there has been various issues building LibreOffice from
ports lately and not everyone can or wants follow all the patches
flying around, I'd like to share that the Linux binary build runs
fine for me.

I downloaded Linux' x86 tar package, did tar xf to get RPMs
and finally:
  for i in *rpm; do rpm2cpio $i | cpio -ivd; done
That created opt/libreoffice3.5. You can move where you like
and start it using libreoffice3.5/program/soffice.

(I'm tracking 9-STABLE with Linux compatibility enabled it this
matters.)

May this help someone lazy or impatient like me...
Oli
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"