Loading ...
Sorry, an error occurred while loading the content.

Re: [blug-prog] TimedOut for Connect System Call

Expand Messages
  • Shriram Ramachandran
    Hi kirti , What u get is correct .Connect will be progressing but we need to find out whether tcp received SYN-ACK from remote side or not .So we use select to
    Message 1 of 5 , Jun 11, 2002
    • 0 Attachment
      Hi kirti ,
      What u get is correct .Connect will be progressing
      but we need to find out whether tcp received SYN-ACK
      from remote side or not .So we use select to find out
      whether connection is successful or it failed .

      I'm sending the page number for u'r reference -
      Unix Network Programming Vol.1 PageNo.411

      TIA
      With Regards
      Vishal

      kirti <kirtim@...> wrote:
      > Hi
      > Correct me if I am wrong...
      >
      > In ur case , socket is non blocking so connect is
      > will return without
      > waiting for any timeout interval.
      > Why u need to use select then ??
      > In my code
      >
      > fcntl(clientSocket,F_SETFL,O_NONBLOCK);
      > if( (connect( clientSocket ,(struct sockaddr
      > *)&destAddr ,sizeof( struct
      > sockaddr_in) ) ) < 0 )
      > {
      > if(errno == EINTR)
      > printf("Interrupted Sys Call");
      >
      > if(errno == EINPROGRESS)
      > printf("Sys Call is in progress");
      > .................
      > }
      > connect is returning with err EINPROGRESS...
      >
      >
      > r_
      > kirti
      >
      >
      > > Hi all ,
      > > I wrote ( more frankly copied from Richard
      > Stevens
      > > ) a program for connect with time out .The logic
      > is to
      > > make the socket as non-blocking and then using
      > select
      > > (which can take a timeout) findout whether
      > connection
      > > is successful or not .
      > >
      > > But in my case select is coming out immediately
      > if i
      > > give a wrong address without waiting for specfied
      > > timeout .Both read and write fds are becoming 1 .
      > >
      > > And sometimes its showing fd as writable(which
      > is
      > > the condition to check connect iss successful)
      > even
      > > though server program is not running .If anyone
      > wants
      > > to debug this code i'll send it .Whether anyone
      > has
      > > been successful in placing a timeout for connect ?
      >
      >
      >
      *********************************************************
      > Disclaimer
      >
      > This message (including any attachments) contains
      > confidential information intended for a specific
      > individual and purpose, and is protected by law.
      > If you are not the intended recipient, you should
      > delete this message and are hereby notified that
      > any disclosure, copying, or distribution of this
      > message, or the taking of any action based on it,
      > is strictly prohibited.
      >
      >
      *********************************************************
      >
      > Visit us at http://www.mahindrabt.com
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Yahoo! - Official partner of 2002 FIFA World Cup
      http://fifaworldcup.yahoo.com
    • gulshan
      Hi all I have compiled 2.4.7, everything went fine, but when i tried to do make modules install i am getting the error that i have included below. ... ld -m
      Message 2 of 5 , Jun 11, 2002
      • 0 Attachment
        Hi all
        I have compiled 2.4.7, everything went fine, but when
        i tried to do "make modules install" i am getting the
        error that i have included below.

        -------------------------------------------------------
        ld -m elf_i386 -T
        /usr/src/linux-2.4.7-10/arch/i386/vmlinux.lds -e stext
        arch/i386/kernel/head.o arch/i386/kernel/init_task.o
        init/main.o init/version.o \
        --start-group \
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o
        kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
        drivers/char/char.o drivers/block/block.o
        drivers/misc/misc.o drivers/net/net.o
        drivers/media/media.o drivers/char/drm/drm.o
        drivers/net/fc/fc.o drivers/net/appletalk/appletalk.o
        drivers/net/tokenring/tr.o drivers/net/wan/wan.o
        drivers/atm/atm.o drivers/ide/idedriver.o
        drivers/scsi/scsidrv.o drivers/cdrom/driver.o
        drivers/pci/driver.o
        drivers/net/wireless/wireless_net.o drivers/pnp/pnp.o
        drivers/video/video.o drivers/md/mddev.o
        arch/i386/math-emu/math.o \
        net/network.o \
        /usr/src/linux-2.4.7-10/arch/i386/lib/lib.a
        /usr/src/linux-2.4.7-10/lib/lib.a
        /usr/src/linux-2.4.7-10/arch/i386/lib/lib.a \
        --end-group \
        -o vmlinux
        nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw]
        \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
        make[1]: Entering directory
        `/usr/src/linux-2.4.7-10/arch/i386/boot'
        gcc -E -D__KERNEL__ -I/usr/src/linux-2.4.7-10/include
        -D__BIG_KERNEL__ -traditional -DSVGA_MODE=NORMAL_VGA
        setup.S -o bsetup.s
        as -o bsetup.o bsetup.s
        bsetup.s: Assembler messages:
        bsetup.s:2858: Warning: indirect lcall without `*'
        ld -m elf_i386 -Ttext 0x0 -s --oformat binary -e
        begtext -o bsetup bsetup.o
        make[2]: Entering directory
        `/usr/src/linux-2.4.7-10/arch/i386/boot/compressed'
        tmppiggy=_tmp_$$piggy; \
        rm -f $tmppiggy $tmppiggy.gz $tmppiggy.lnk; \
        objcopy -O binary -R .note -R .comment -S
        /usr/src/linux-2.4.7-10/vmlinux $tmppiggy; \
        gzip -f -9 < $tmppiggy > $tmppiggy.gz; \
        echo "SECTIONS { .data : { input_len = .;
        LONG(input_data_end - input_data) input_data = .;
        *(.data) input_data_end = .; }}" > $tmppiggy.lnk; \
        ld -m elf_i386 -r -o piggy.o -b binary $tmppiggy.gz -b
        elf32-i386 -T $tmppiggy.lnk; \
        rm -f $tmppiggy $tmppiggy.gz $tmppiggy.lnk
        ld -m elf_i386 -Ttext 0x100000 -e startup_32 -o
        bvmlinux head.o misc.o piggy.o
        make[2]: Leaving directory
        `/usr/src/linux-2.4.7-10/arch/i386/boot/compressed'
        objcopy -O binary -R .note -R .comment -S
        compressed/bvmlinux compressed/bvmlinux.out
        tools/build -b bbootsect bsetup
        compressed/bvmlinux.out CURRENT > bzImage
        Root device is (3, 10)
        Boot sector 512 bytes.
        Setup is 4644 bytes.
        System is 771 kB
        sh -x ./install.sh 2.4.7-10custom bzImage
        /usr/src/linux-2.4.7-10/System.map ""
        + '[' -x /root/bin/installkernel ']'
        + '[' -x /sbin/installkernel ']'
        + exec /sbin/installkernel 2.4.7-10custom bzImage
        /usr/src/linux-2.4.7-10/System.map ''
        Warning: device 0x0308 exceeds 1024 cylinder limit
        Fatal: sector 20668420 too large for linear mode (try
        'lba32' instead)
        make[1]: *** [install] Error 1
        make[1]: Leaving directory
        `/usr/src/linux-2.4.7-10/arch/i386/boot'
        make: *** [install] Error 2
        -------------------------------------------------------
        Do i have any takers for this problem.
        Cheers
        Gulshan



        __________________________________________________
        Do You Yahoo!?
        Yahoo! - Official partner of 2002 FIFA World Cup
        http://fifaworldcup.yahoo.com
      • Niraj Kumar
        ... From the last part of your error message it seems to me that you need to use LBA (Logical Block Addressing )option in your boot loader . For GRUB:
        Message 3 of 5 , Jun 11, 2002
        • 0 Attachment
          --- gulshan <gulshan_28@...> wrote:
          > + exec /sbin/installkernel 2.4.7-10custom bzImage
          > /usr/src/linux-2.4.7-10/System.map ''
          > Warning: device 0x0308 exceeds 1024 cylinder limit
          > Fatal: sector 20668420 too large for linear mode
          > (try
          > 'lba32' instead)

          From the last part of your error message it seems to
          me
          that you need to use LBA (Logical Block Addressing
          )option in your boot loader .

          For GRUB:
          http://www.gnu.org/manual/grub/html_node/setup.html#setup
          For LILO , see this:
          http://www.redhat.com/mailing-lists/pinstripe-list/msg01248.html



          Regards
          Niraj

          =====
          Visit my webpage at http://www.niraj.4t.com

          __________________________________________________
          Do You Yahoo!?
          Yahoo! - Official partner of 2002 FIFA World Cup
          http://fifaworldcup.yahoo.com
        • Aneesh Kumar K.V
          ... The rule is make modules_install NOT make modules install -aneesh
          Message 4 of 5 , Jun 11, 2002
          • 0 Attachment
            >On Tue, 2002-06-11 at 18:51, gulshan wrote: Hi all
            >I have compiled 2.4.7, everything went fine, but when
            >i tried to do "make modules install" i am getting the
            >error that i have included below.

            The rule is make modules_install

            NOT make modules install

            -aneesh
          Your message has been successfully submitted and would be delivered to recipients shortly.