ATA trouble again
Hello. This is a follow-up of a previous thread, which can be found here: http://lists.freebsd.org/pipermail/freebsd-questions/2011-July/232257.html I finally have two working WD Green drives: they have run severel times for more than a few days continuosly and I've run their full diags a few times over a span of some weeks, so I think I can be sure of that. Still I experience lot of troubles; however, trying different boxes, I found out that these depend heavily on the controller I use. A) A-Bit KV7 (featuring a VIA KT600) on 7.3 and 8.2/i386 With only one disk, I get some NID_NOT_FOUND errors, but I could almost say they can be ignored. With two disks, the NID_NOT_FOUND errors come frequently; rsync will work, but a diff will sooner or later fail. I tried Linux on this box: it frequently complains about errors and resets the ATA channels; this possibly will result in performance penalties, but it seems to work. Since then this box is dead, so I cannot do other tests. B) BioStar A785G3 with 8.1/i386: # pciconf -lv atapci0@pci0:0:17:0:class=0x010601 card=0x43911002 chip=0x43911002 rev=0x00 hdr=0x00 vendor = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.' device = 'SB700 SATA Controller [AHCI mode]' class = mass storage subclass = SATA This works flawlessly. C) Intel SC5400BRP with 7.3/i386: atapci2@pci0:0:31:2:class=0x01018f card=0x34768086 chip=0x26808086 rev=0x09 hdr=0x00 vendor = 'Intel Corporation' device = '631xESB/632xESB/3100 Serial ATA Storage Controller' class = mass storage subclass = ATA No way this will work: using two disk gives gobs of errors, until the whole box crashes. With only one disk it appears to work for a while, but will eventually panic over a few day. This same controller used to work with a single Hitachi drive. With two Seagates drives, I get READ_DMA48/WRITE_DMA48 timeouts, the disks will hang for minutes, but then they will start again; this does not happen as soon as I start using them, but will happen every some minutes after a few hours of usage. D) Intel SC5600BRP with 7.3/amd64: atapci0@pci0:0:31:2:class=0x01018f card=0x34dc8086 chip=0x3a208086 rev=0x00 hdr=0x00 vendor = 'Intel Corporation' device = 'SATA2(4Port2) (ICH10 Family)' class = mass storage subclass = ATA atapci1@pci0:0:31:5:class=0x010185 card=0x34dc8086 chip=0x3a268086 rev=0x00 hdr=0x00 vendor = 'Intel Corporation' device = 'SATA2(2Port2) (ICH10 Family)' class = mass storage subclass = ATA This works flawlessly, with every HD I could try (one or two). E) Promise PCI controller with 7.3/i386 and /amd64: atapci0@pci0:7:2:0: class=0x018000 card=0x3d17105a chip=0x3d17105a rev=0x02 hdr=0x00 vendor = 'Promise Technology Inc' device = 'SATA 300 TX4 Controller (PDC40718-GP)' class = mass storage This will give few errors if not none at all; however the box will sometimes reboot or just hang (phisical reset required). This happens on two different box with both WD Green and Seagate drives. So: altough a bit flaky, WD drives are not the main problem. I'll still appreciate some help WRT the third box (Intel SC5400BRP with 7.3/i386). Different BIOS settings did not help with WD drives, but I still have to test them with Seagate's. Possibly an OS upgrade would help? 8.x also has an AHCI driver that 7.3 is missing. I don't care that much for top of the chart performance, I just want this thing to work decently. bye Thanks av. ___ 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: geli + journal
On 15/11/2011 19:33, Коньков Евгений wrote: Здравствуйте, RW. Вы писали 15 ноября 2011 г., 1:50:54: R On Tue, 15 Nov 2011 00:06:00 +0200 R Коньков Евгений wrote: catch idea, but some question: in this situation .eli.journal journal device will not be encrypted? can you describe how data flow will be? R The journal is encrypted unless you choose to put it on a separate R non-encrypted device. R In principle the data is encrypted into the journal, decrypted from R the journal and then re-encrypted into its final location. In practice R I've found that in file copying between disks, writing uses about R twice as much cpu time as reading, so maybe the decryption from the R journal can be avoided by caching. Are there differences between .eli.journal or .journal.eli? Yes, UFS gjournal support will only work with .eli.journal. signature.asc Description: OpenPGP digital signature
RE: ATA trouble again
Hello. This is a follow-up of a previous thread, which can be found here: http://lists.freebsd.org/pipermail/freebsd-questions/2011-July/232257. html I finally have two working WD Green drives: they have run severel times for more than a few days continuosly and I've run their full diags a few times over a span of some weeks, so I think I can be sure of that. Still I experience lot of troubles; however, trying different boxes, I found out that these depend heavily on the controller I use. Hi Andrea, I don’t know if this will help you or not, but it may lead you to another possibility. I had a similar problem on my box (I was running 9.0-Current and Now 10.0-Current). I was also running under ZFS and would get TONS of Errors across my SATA drives. The errors would be anything from time-outs to physical locking of the drive (I would have to pull the drive to let the PHY on the controller reset and then plug the drive back in before it would communicate with the machine again). In particular this would happen when I was doing large writes to the drives. Read performance also suffered. I then created a single drive pool and did a large transfer to the drive (about 800Gb) and the controller timed out again. I moved the drive to various ports on the machine and also various controllers in the machine. Some seemed to exabate the problem quicker but no port or drive was safe from this. I later found out that the drives I was using were using 4096 Bytes per sector. When I recreated the zpool using 4096 byte sectors All the timeout errors disappeared and my data-rate has climbed Dramatically. Are you using ZFS or do you know if the drives are using 4096 bytes Per sector? Ta Peg ___ 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: ATA trouble again
On 11/16/11 12:23, Pegasus Mc Cleaft wrote: Are you using ZFS? No. I'm using gstripe. or do you know if the drives are using 4096 bytes Per sector? How do I find out without physical access to the box? bye Thanks av. ___ 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: problems in ppp negotiating
On 2011/11/16 at 03:25, Matthias Apitz g...@unixarea.de wrote: El día Wednesday, November 16, 2011 a las 01:14:42AM +0800, Denise H. G. escribió: Hi What is in your /etc/ppp.conf? To better locate your problem, you'd better show us the config file. Hello, I was thinking in this, but then I realized that the ppp.bad file contained it, even the SIM PIN; anyway, here it is: # default: set log Phase Chat LCP IPCP CCP tun command umts: set device /dev/cuaU0.0 # device name in CURRENT set speed 230400 set dial ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ \\ AT OK-AT-OK ATZ OK \ AT+CFUN=1 OK \ at+cpin=4708 O \ AT+COPS=0 OK \ AT+CGDCONT=1,\\\IP\\\,\\\pinternet.interkom.de\\\ OK \ \\dATDT\\T TIMEOUT 40 CONNECT set logout ABORT BUSY ABORT ERROR TIMEOUT 30 \\ +++ATH O ATH OK set phone *99*1\# set authname fonic set authkey fonic set timeout 300 set ifaddr 0.0.0.0/0 10.64.64.64/0 255.255.255.0 0.0.0.0 The line above might be the problem. If you dial mode is NOT `auto', you don't need `set ifaddr' thing, according to the manual of `ppp(8)'. Or you are using `auto' mode to dial up, give it try to use: set ifaddr 10.64.64.64/0 10.64.64.64/0 255.255.255.255 0.0.0.0 This part of the ppp configuration is about using IPCP protocal to negotiate IP address. And your attached ppp logs have IPCP errors. Anyway, I am not sure if this would help or not. Just give it try. Regards. add default HISADDR# Add a (sticky) default route enable dns disable ipv6cp -- Matthias Apitz e g...@unixarea.de - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5 -- Hindsight is an exact science. ___ 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
Serial console with incorrect terminal set
Hi All, I have two servers currently colocated, one running FreeBSD 8.2/amd64 , and the other is a Sun Netra T1 that I am attempting to install FreeBSD 8.2 on, over serial. When the system booted up, I was presented with a list of console options and I chose the first option, I believe to be ANSI (I have a knack for never picking the right one). The keyboard mapping was a bit screwed up, but somehow I managed to get to the Fixit shell. In order to test that I had my secondary NIC setup correctly, I just ran 'ping 10.0.0.2' and now it wont stop. If I hit 'Ctrl+C', it keeps going. I tried 'Ctrl+Z' in order to attempt to suspend it so I can kill the process, but that brings up the 'Abort, Restart, Continue' screen, but it gets interrupted by ping. I tried sending a break command using '~#', but I can't get to the OpenFirmware to restart in attempt to pick the correct terminal settings. IIRC, the break is not supported without a kernel that supports it. It could be easier to call my ISP and have someone power down the machine for me, as the Netra has LOM. In a worse case scenario, I can swing by and do it myself after work. My question is, is there another way to either 1) Stop ping or 2) Get to the openfirmware console? Thanks, James ___ 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: ATA trouble again
On Wed, 16 Nov 2011, Andrea Venturoli wrote: On 11/16/11 12:23, Pegasus Mc Cleaft wrote: Are you using ZFS? No. I'm using gstripe. or do you know if the drives are using 4096 bytes Per sector? How do I find out without physical access to the box? diskinfo -v /dev/ada0 Although it may lie about true sector size. Otherwise, get the model number from dmesg and search on it. ___ 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: Build options built by dialog(1)
Bingo! The make {,rm}config looks like it. There's hope for 9.0-R* after all! On Tue, 15 Nov 2011, Greg Larkin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/15/11 7:15 PM, Chuck Bacon wrote: I stumbled into a problem trying to get xorg up on my current 9.0-RC1. I selected an intolerable choice, notable PTH. Now the choice of Python causes the build to fail, and I can't find the output of dialog(1). Question: How can I restart the build with a new dialog(1)? Put another way, where are the various build variables kept? Once again, this old 650-704-7070-PDP4-KA/KI/KL/KS-CTSS- Convex-IBMPC-3B1 warrior needs help :-} Chuck Bacon -- c...@cape.com ABHOR SECRECY -- DEFEND PRIVACY Hi Chuck, Check in /var/db/ports/*/options. You can also run make config or make rmconfig in a port directory to re-configure or remove the current configuration, respectively. HTH, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/cpucycle/ - Follow you, follow me -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7DAt4ACgkQ0sRouByUApBmFgCgnxZx1BaWyi1qwbLacLPysqnr bd0An30/VE3+nqLS5IkramZjeM4pXwJ2 =C4VN -END PGP SIGNATURE- ___ 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: Build options built by dialog(1)
Thank you for a very complete way of saying RTFM - I confess a distaste for heavy lit, but man pages! I thank you again! Chuck Bacon -- c...@cape.com ABHOR SECRECY -- DEFEND PRIVACY On Wed, 16 Nov 2011, Polytropon wrote: On Tue, 15 Nov 2011 19:15:01 -0500 (EST), Chuck Bacon wrote: I stumbled into a problem trying to get xorg up on my current 9.0-RC1. I selected an intolerable choice, notable PTH. Now the choice of Python causes the build to fail, and I can't find the output of dialog(1). Question: How can I restart the build with a new dialog(1)? Put another way, where are the various build variables kept? The options are stored in /var/db/ports/name/options. The Frontend to access them is: # make config # make rmconfig # make config-recursive # make rmconfig-recursive The last two options are really helpful when the problems you're encountering are provided by a dependency port. See man 7 ports for details. Optional, in worst case, options can also be provided my a Makefile.local in the port's directory. Also note that /etc/make.conf as well as the configuration files of port management tools may contain options. Once again, this old 650-704-7070-PDP4-KA/KI/KL/KS-CTSS- Convex-IBMPC-3B1 warrior needs help :-} Impressive path! =^_^= -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ 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: Serial console with incorrect terminal set
On Wed, Nov 16, 2011 at 3:52 PM, James Edwards jedwa...@bsdftw.org wrote: Hi All, I have two servers currently colocated, one running FreeBSD 8.2/amd64 , and the other is a Sun Netra T1 that I am attempting to install FreeBSD 8.2 on, over serial. When the system booted up, I was presented with a list of console options and I chose the first option, I believe to be ANSI (I have a knack for never picking the right one). The keyboard mapping was a bit screwed up, but somehow I managed to get to the Fixit shell. In order to test that I had my secondary NIC setup correctly, I just ran 'ping 10.0.0.2' and now it wont stop. If I hit 'Ctrl+C', it keeps going. I tried 'Ctrl+Z' in order to attempt to suspend it so I can kill the process, but that brings up the 'Abort, Restart, Continue' screen, but it gets interrupted by ping. I tried sending a break command using '~#', but I can't get to the OpenFirmware to restart in attempt to pick the correct terminal settings. IIRC, the break is not supported without a kernel that supports it. It could be easier to call my ISP and have someone power down the machine for me, as the Netra has LOM. In a worse case scenario, I can swing by and do it myself after work. My question is, is there another way to either 1) Stop ping or 2) Get to the openfirmware console? You can stop ping with : $ pkill -TERM ping From the ping man page: -c count Stop after sending (and receiving) count ECHO_RESPONSE packets. If this option is not specified, ping will operate until inter- rupted. So with something like ping -c4 10.0.0.2 , it would stop after 4 pings. Good luck ;) Adriaan ___ 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
something wrong with interrupts
Hi, system just rebooted. stay without load one day today, when I login I saw: #top -SIHP last pid: 88958; load averages: 0.99, 0.97, 0.92up 1+05:27:18 23:45:42 109 processes: 6 running, 84 sleeping, 19 waiting CPU 0: 0.0% user, 0.0% nice, 0.0% system, 97.6% interrupt, 2.4% idle CPU 1: 0.0% user, 0.0% nice, 0.8% system, 0.0% interrupt, 99.2% idle CPU 2: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle CPU 3: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle Mem: 136M Active, 355M Inact, 217M Wired, 212K Cache, 112M Buf, 2211M Free Swap: 32G Total, 32G Free PID USERNAME PRI NICE SIZERES STATE C TIME WCPU COMMAND 11 root 155 ki31 0K32K CPU33 29.4H 100.00% idle{idle: cpu3} 11 root 155 ki31 0K32K CPU22 29.4H 100.00% idle{idle: cpu2} 11 root 155 ki31 0K32K RUN 1 29.3H 100.00% idle{idle: cpu1} 12 root -88- 0K 160K CPU00 421:07 100.00% intr{irq16: atapci0} 11 root 155 ki31 0K32K RUN 0 22.3H 0.29% idle{idle: cpu0} why intr take all CPU time?? I do nothing! # vmstat -i interrupt total rate irq1: atkbd0 14 0 irq16: atapci0 240185057 2262 irq23: ehci0 ehci1368174 3 cpu0:timer 438088141 4125 irq256: re0 145321 1 cpu1:timer 373026062 3513 cpu3:timer 57648330542 cpu2:timer 43618662410 Total 1153079761 10859 systat -v 1 usersLoad 0,96 0,96 0,92 16 ноя 23:48 Mem:KBREALVIRTUAL VN PAGER SWAP PAGER Tot Share TotShareFree in out in out Act 1659205840 586612 7676 2264164 count All 2782487756 274424417100 pages Proc:Interrupts r p d s w Csw Trp Sys Int Sof Fltcow 18012 total 42 47k1 116 9278 40211 1 zfodatkbd0 1 ozfod 9275 atapci0 16 0,0%Sys 25,0%Intr 0,0%User 0,0%Nice 75,0%Idle%ozfod 3 ehci0 ehci ||||||||||| daefr 4129 cpu0:timer prcfr 1 re0 256 12 dtbuf 40 totfr 4129 cpu1:timer Namei Name-cache Dir-cache126612 desvn react10 cpu3:timer Callshits %hits % 90415 numvn pdwak 465 cpu2:timer 317 113 36 31651 frevn pdpgs intrn Disks ada0 da0 pass0 pass1 222376 wire KB/t 15,44 0,00 0,00 0,00 139736 act tps 5 0 0 0 363240 inact MB/s 0,08 0,00 0,00 0,00 212 cache %busy 0 0 0 0 2263952 free # iostat ttyada0 da0pass0 cpu tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id 0 3 10.53 1 0.01 0.01 0 0.00 0.00 0 0.00 0 0 0 6 94 How to fix that? # uname -a FreeBSD 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Sat Nov 12 20:17:02 EET 2011 :/usr/obj/usr/src/sys/KES_KERN_v10 i386 -- С уважением, Коньков mailto:kes-...@yandex.ru ___ 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
[OT] but concerns all of us
My apologies to all for this, specially to those who already know about this and those who think too little of it. I am really worried about this: http://americancensorship.org/ If these rootless people get control of what goes through the root servers, we will loose the last free medium of expression and info exchange that is not owned by a corporation or anybody. I don't know if I should be worried or not, but if my worries are founded and this comes to pass, as far as I can see, it will be the end of this great tool as we know it today. There is a petition going on here: http://www.avaaz.org/en/save_the_internet/ There are a lot of Americans on this list that have a lot more power than the rest of us to change this. A LOT of people from all over the world is signing this petition. I hope at least some don't judge me to be over dramatic here but this situation sounds very much so. I hope that most of you (if not all) replicates this and that I don't get scalded for this post. I can only hope -- Mario Lobo http://www.mallavoodoo.com.br FreeBSD since 2.2.8 [not Pro-Audio YET!!] (99% winblows FREE) ___ 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: Serial console with incorrect terminal set
On Wed, November 16, 2011 14:52, J65nko wrote: You can stop ping with : $ pkill -TERM ping From the ping man page: -c count Stop after sending (and receiving) count ECHO_RESPONSE packets. If this option is not specified, ping will operate until inter- rupted. So with something like ping -c4 10.0.0.2 , it would stop after 4 pings. Good luck ;) Adriaan Hello Adriaan, Thanks for the response, but unfortunately, that's not really what I was looking for, as it was not feasible - I was unable to open another terminal in order to kill the ping process. I probably should have elaborated more, but I was running this from a fixit live cd, but do you know if it is possible to open more than one terminal over serial? I ended up having it powered off earlier today, and when I powered it back on, I made sure to have the correct console keyboard layout, and CTRL + C was working correctly. Thanks, James ___ 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: Can't access a music CD (or any other media now)
On Sun, 13 Nov 2011 07:41:27 -0500 Jerry je...@seibercom.net wrote: On Sun, 13 Nov 2011 04:44:56 -0600 Conrad J. Sabatier articulated: Ah-ha! After plowing through a ton of ports and docs tonight, I finally had a Eureka! moment. It seems that it's quite possible to fashion a poor man's CD player app (script) out of the following cdda2wav command options (got this example from the man page): cdda2wav -q -e -t4 -d0 -N In this case, -t4 means to play track 4. Using -B instead, would play the whole disc. The command simply sends the data to the soundcard (/dev/dsp) as it's being ripped. In combination with a few other cdda2wav options to obtain the CDDB info for the disc, one could fairly easily whip up a little CD player script. I'm a man on a mission now! :-) I *will* be rolling up my sleeves and hacking together some shell code in the days to come. May even wind up submitting the finished product as a new port for the benefit of other folks out there still struggling to play their CDs since the CD infrastructure changed not too long ago. Light! I see light at the end of the tunnel! :-) I applaud your enthusiasm. I actually tend to try and reinvent the wheel from time to time myself. Not so much because I feel the wheel has an inherent flaw but rather because I just like a good challenge. While such endeavors might prove useful from strictly a theoretical research point of view, in practice they can seriously reduce productivity. I totally agree. I'm the same when it comes to enjoying a good challenge. Call me masochistic if you will :-), but I do enjoy programming very much. Sometimes just to see if can actually do it. Learning new stuff, that sort of thing. I often wonder what happened to the premise that computers should make man's life easier, not harder. Why should users be force to go to these extremes to just play an audio CD when other OSs all ready have that capability sans ruminating for such a simple task. Again, totally agree. I really miss the /dev/acd0t${n} method of accessing audio tracks. That was truly a handy feature. Again, good luck. I won't be partaking of your research since I have other PCs near me that are fully capable of preforming the relatively simple task of playing an audio CD. However, if you do get some free time perhaps you could invest it in some really socially advantageous work such as find a cure for cancer. Now that would be something that all could appreciate. Well, if I had the skills, I'd try and fix the current problems associated with audio CD access. But I'm afraid that's just a bit beyond my abilities. I've looked at some source code, but wouldn't have the first clue where to begin. Now, as for curing cancer...I'll leave that to the experts as well. :-) Above all else, though (on a more serious note), I *will* resist the temptation I've sometimes given into in the past, and will *not* resort to taking up residence in the land of the penguin. Would much prefer to stick around here and see how things develop. -- Conrad J. Sabatier conr...@cox.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
SSL server refusing connection : ECONNREFUSED
Hello, I am new to openssl and trying to create a demo client and server which use SSL v3. But the server, for some reason I cannot figure out, always refuses connections with the client reporting errno as ECONNREFUSED. Can somebody please help me out with what might be the problem ? Relevant portions of sources for server and client are available below. Thank you Regards Manish Jain invalid.poin...@gmail.com //server SSL_METHOD * lpmethod = SSLv3_method(); SSL_CTX * lpctx = SSL_CTX_new(lpmethod); int result = SSL_CTX_use_certificate_chain_file(lpctx, CERT_FILE); assert(result 0); result = SSL_CTX_use_PrivateKey_file(lpctx, KEY_FILE, SSL_FILETYPE_PEM); assert(result 0); result = SSL_CTX_check_private_key(lpctx); assert(result != 0); sockaddr_in addr; int sock = socket(AF_INET, SOCK_STREAM, 0); sockaddr_in sin; int val = 1; memset((char *)addr, 0, sizeof(addr)); addr.sin_addr.s_addr=INADDR_ANY; addr.sin_family = AF_INET; addr.sin_port = htons(PORT); setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, val, sizeof(val)); bind(sock, (sockaddr *) sin, sizeof(sin)); result = listen(sock,5); std::cout listen returned result std::endl; int new_sock = accept(sock, 0, 0); //client : SSL_library_init(); SSL_load_error_strings(); SSL_METHOD * lpmethod = SSLv3_method(); SSL_CTX * lpctx = SSL_CTX_new(lpmethod); int result = SSL_CTX_use_certificate_chain_file(lpctx, CERT_FILE); assert(result 0); result = SSL_CTX_use_PrivateKey_file(lpctx, KEY_FILE, SSL_FILETYPE_PEM); assert(result 0); result = SSL_CTX_check_private_key(lpctx); assert(result != 0); SSL_CTX_set_verify(lpctx, SSL_VERIFY_PEER, 0); sockaddr_in addr; memset((char *) addr, 0, sizeof(addr)); addr.sin_addr.s_addr = inet_addr(127.0.0.1); addr.sin_family = AF_INET; addr.sin_port = htons(); int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); assert(sock 0); result = connect(sock, (struct sockaddr *)addr, sizeof(addr)); ___ 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