• TNSX socket IP designation

    From SRSeedBurners@21:1/5 to All on Wed Jan 25 09:52:10 2023
    We are transitioning to our new x-series systems. Probably using wrong terminology here but - our new tcpip topology is going to use a provider stack name (e.g. $ZTC10) which will have TWO tcpip numbers associated with it (e.g. 69.25.1.2 & 69.25.1.5).
    On our current TNSE systems we have one IP number per stack (i.e. $ZTC10 is 69.25.1.2). The new system is using a active-active failover so that if one CLIM goes down the other takes over without skipping a beat. I have no idea how that works but....

    My question: is there a way to pick which IP address is used in our code? We currently get a socket using

    socket_set_inet_name(STACK_NAME);
    socket = socket_nw(AF_INET,SOCK_STREAM,ITPROTO_TCP,2D,2D);

    I was told that it's going to round-robin now between the addresses. Can't have that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to SRSeedBurners on Wed Jan 25 12:21:39 2023
    On Wed, 25 Jan 2023 09:52:10 -0800 (PST), SRSeedBurners <sterlingranch@gmail.com> wrote:

    We are transitioning to our new x-series systems. Probably using wrong terminology here but - our new tcpip topology is going to use a provider stack name (e.g. $ZTC10) which will have TWO tcpip numbers associated with it (e.g. 69.25.1.2 & 69.25.1.5).
    On our current TNSE systems we have one IP number per stack (i.e. $ZTC10 is 69.25.1.2). The new system is using a active-active failover so that if one CLIM goes down the other takes over without skipping a beat. I have no idea how that works but...
    .

    My question: is there a way to pick which IP address is used in our code? We currently get a socket using

    socket_set_inet_name(STACK_NAME);
    socket = socket_nw(AF_INET,SOCK_STREAM,ITPROTO_TCP,2D,2D);

    I was told that it's going to round-robin now between the addresses. Can't have that.

    Look into the call to 'bind(), placed after the socket_nw() completes'. This works for clients (connect_nw) or servers (listen).

    Bill

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to Bill Honaker on Thu Jan 26 17:40:30 2023
    On Wed, 25 Jan 2023 12:21:39 -0600, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:

    On Wed, 25 Jan 2023 09:52:10 -0800 (PST), SRSeedBurners <sterlingranch@gmail.com> wrote:

    We are transitioning to our new x-series systems. Probably using wrong terminology here but - our new tcpip topology is going to use a provider stack name (e.g. $ZTC10) which will have TWO tcpip numbers associated with it (e.g. 69.25.1.2 & 69.25.1.5)
    . On our current TNSE systems we have one IP number per stack (i.e. $ZTC10 is 69.25.1.2). The new system is using a active-active failover so that if one CLIM goes down the other takes over without skipping a beat. I have no idea how that works but..
    ..

    My question: is there a way to pick which IP address is used in our code? We currently get a socket using

    socket_set_inet_name(STACK_NAME);
    socket = socket_nw(AF_INET,SOCK_STREAM,ITPROTO_TCP,2D,2D);

    I was told that it's going to round-robin now between the addresses. Can't have that.

    Look into the call to 'bind(), placed after the socket_nw() completes'. This works for clients (connect_nw) or servers (listen).

    Bill

    In C, the code would be something like this (there may need to be some casts):

    #include <socket.h>
    #include <in.h>
    #include <netdb.h>
    int error, socket;
    struct sockaddr_in addr;
    long tag;


    addr.sa_family = AF_INET;
    addr.sin_port = 2323;
    addr.sin_addr = inet_addr("192.168.1.1");
    error = bind (socket, &addr, sizeof(addr), address_len);
    or
    error = bind_nw (socket, &addr, sizeof(addr), tag);

    Compile this with extensions on. Note that the address you put in must be one of the subnets that is defined to run in the stack (eg $ZTC0).

    If you need an IPV6 addrses, usea sockaddr_in6 instead of a sockaddr_in and fill it in appropriately.

    Good luck, let us know if you get it working (with maybe a simple example!
    Bill

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randall@21:1/5 to Bill Honaker on Fri Jan 27 11:11:26 2023
    On Thursday, January 26, 2023 at 6:40:33 p.m. UTC-5, Bill Honaker wrote:
    On Wed, 25 Jan 2023 12:21:39 -0600, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:

    On Wed, 25 Jan 2023 09:52:10 -0800 (PST), SRSeedBurners <sterli...@gmail.com> wrote:

    We are transitioning to our new x-series systems. Probably using wrong terminology here but - our new tcpip topology is going to use a provider stack name (e.g. $ZTC10) which will have TWO tcpip numbers associated with it (e.g. 69.25.1.2 & 69.25.1.5).
    On our current TNSE systems we have one IP number per stack (i.e. $ZTC10 is 69.25.1.2). The new system is using a active-active failover so that if one CLIM goes down the other takes over without skipping a beat. I have no idea how that works but....

    My question: is there a way to pick which IP address is used in our code? We currently get a socket using

    socket_set_inet_name(STACK_NAME);
    socket = socket_nw(AF_INET,SOCK_STREAM,ITPROTO_TCP,2D,2D);

    I was told that it's going to round-robin now between the addresses. Can't have that.

    Look into the call to 'bind(), placed after the socket_nw() completes'. This works for clients (connect_nw) or servers (listen).

    Bill
    In C, the code would be something like this (there may need to be some casts):

    #include <socket.h>
    #include <in.h>
    #include <netdb.h>
    int error, socket;
    struct sockaddr_in addr;
    long tag;


    addr.sa_family = AF_INET;
    addr.sin_port = 2323;
    addr.sin_addr = inet_addr("192.168.1.1");
    error = bind (socket, &addr, sizeof(addr), address_len);
    or
    error = bind_nw (socket, &addr, sizeof(addr), tag);

    Compile this with extensions on. Note that the address you put in must be one of the subnets that is defined to run in the stack (eg $ZTC0).

    If you need an IPV6 addrses, usea sockaddr_in6 instead of a sockaddr_in and fill it in appropriately.

    Good luck, let us know if you get it working (with maybe a simple example! Bill

    Depends on whether this is in Guardian or OSS. bind_nw, AFAIK, is no longer supported in OSS. You might have to use other defines also, like _XOPEN_SOURCE_EXTENDED 1, and _XOPEN_SOURCE, to make the right definitions available. I am not sure you can pick
    in IPv6 address. Whether this works also depends on whether your stack is multi-home or not. If it not, picking the appropriate =TCPIP^PROCESS^NAME define value may be sufficient without changing code.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to Randall on Fri Jan 27 14:55:39 2023
    On Fri, 27 Jan 2023 11:11:26 -0800 (PST), Randall <rsbecker@nexbridge.com> wrote:

    On Thursday, January 26, 2023 at 6:40:33 p.m. UTC-5, Bill Honaker wrote:
    On Wed, 25 Jan 2023 12:21:39 -0600, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:

    On Wed, 25 Jan 2023 09:52:10 -0800 (PST), SRSeedBurners <sterli...@gmail.com> wrote:

    We are transitioning to our new x-series systems. Probably using wrong terminology here but - our new tcpip topology is going to use a provider stack name (e.g. $ZTC10) which will have TWO tcpip numbers associated with it (e.g. 69.25.1.2 & 69.25.1.5)
    . On our current TNSE systems we have one IP number per stack (i.e. $ZTC10 is 69.25.1.2). The new system is using a active-active failover so that if one CLIM goes down the other takes over without skipping a beat. I have no idea how that works but....

    My question: is there a way to pick which IP address is used in our code? We currently get a socket using

    socket_set_inet_name(STACK_NAME);
    socket = socket_nw(AF_INET,SOCK_STREAM,ITPROTO_TCP,2D,2D);

    I was told that it's going to round-robin now between the addresses. Can't have that.

    Look into the call to 'bind(), placed after the socket_nw() completes'. This works for clients (connect_nw) or servers (listen).

    Bill
    In C, the code would be something like this (there may need to be some casts):

    #include <socket.h>
    #include <in.h>
    #include <netdb.h>
    int error, socket;
    struct sockaddr_in addr;
    long tag;


    addr.sa_family = AF_INET;
    addr.sin_port = 2323;
    addr.sin_addr = inet_addr("192.168.1.1");
    error = bind (socket, &addr, sizeof(addr), address_len);
    or
    error = bind_nw (socket, &addr, sizeof(addr), tag);

    Compile this with extensions on. Note that the address you put in must be one of the subnets that is defined to run in the stack (eg $ZTC0).

    If you need an IPV6 addrses, usea sockaddr_in6 instead of a sockaddr_in and fill it in appropriately.

    Good luck, let us know if you get it working (with maybe a simple example! >> Bill

    Depends on whether this is in Guardian or OSS. bind_nw, AFAIK, is no longer supported in OSS. You might have to use other defines also, like _XOPEN_SOURCE_EXTENDED 1, and _XOPEN_SOURCE, to make the right definitions available. I am not sure you can pick
    in IPv6 address. Whether this works also depends on whether your stack is multi-home or not. If it not, picking the appropriate =TCPIP^PROCESS^NAME define value may be sufficient without changing code.


    Since the OP had socket_nw() in his example I assumed Guardian.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randall@21:1/5 to Bill Honaker on Sat Jan 28 14:16:48 2023
    On Friday, January 27, 2023 at 3:55:42 p.m. UTC-5, Bill Honaker wrote:
    On Fri, 27 Jan 2023 11:11:26 -0800 (PST), Randall <rsbe...@nexbridge.com> wrote:

    On Thursday, January 26, 2023 at 6:40:33 p.m. UTC-5, Bill Honaker wrote:
    On Wed, 25 Jan 2023 12:21:39 -0600, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:

    On Wed, 25 Jan 2023 09:52:10 -0800 (PST), SRSeedBurners <sterli...@gmail.com> wrote:

    We are transitioning to our new x-series systems. Probably using wrong terminology here but - our new tcpip topology is going to use a provider stack name (e.g. $ZTC10) which will have TWO tcpip numbers associated with it (e.g. 69.25.1.2 & 69.25.1.
    5). On our current TNSE systems we have one IP number per stack (i.e. $ZTC10 is 69.25.1.2). The new system is using a active-active failover so that if one CLIM goes down the other takes over without skipping a beat. I have no idea how that works but....

    My question: is there a way to pick which IP address is used in our code? We currently get a socket using

    socket_set_inet_name(STACK_NAME);
    socket = socket_nw(AF_INET,SOCK_STREAM,ITPROTO_TCP,2D,2D);

    I was told that it's going to round-robin now between the addresses. Can't have that.

    Look into the call to 'bind(), placed after the socket_nw() completes'. This works for clients (connect_nw) or servers (listen).

    Bill
    In C, the code would be something like this (there may need to be some casts):

    #include <socket.h>
    #include <in.h>
    #include <netdb.h>
    int error, socket;
    struct sockaddr_in addr;
    long tag;


    addr.sa_family = AF_INET;
    addr.sin_port = 2323;
    addr.sin_addr = inet_addr("192.168.1.1");
    error = bind (socket, &addr, sizeof(addr), address_len);
    or
    error = bind_nw (socket, &addr, sizeof(addr), tag);

    Compile this with extensions on. Note that the address you put in must be one of the subnets that is defined to run in the stack (eg $ZTC0).

    If you need an IPV6 addrses, usea sockaddr_in6 instead of a sockaddr_in and fill it in appropriately.

    Good luck, let us know if you get it working (with maybe a simple example!
    Bill

    Depends on whether this is in Guardian or OSS. bind_nw, AFAIK, is no longer supported in OSS. You might have to use other defines also, like _XOPEN_SOURCE_EXTENDED 1, and _XOPEN_SOURCE, to make the right definitions available. I am not sure you can
    pick in IPv6 address. Whether this works also depends on whether your stack is multi-home or not. If it not, picking the appropriate =TCPIP^PROCESS^NAME define value may be sufficient without changing code.
    Since the OP had socket_nw() in his example I assumed Guardian.

    Me too, but at one point in time, socket_nw() was not excluded explicitly from OSS. No RVU was given by the OP.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)