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.
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
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).
BillIn 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;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.
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
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:In C, the code would be something like this (there may need to be some casts):
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
#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.
On Fri, 27 Jan 2023 11:11:26 -0800 (PST), Randall <rsbe...@nexbridge.com> wrote:Me too, but at one point in time, socket_nw() was not excluded explicitly from OSS. No RVU was given by the OP.
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:In C, the code would be something like this (there may need to be some casts):
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
#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.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 01:44:46 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,188 |