Hi all!
I'm nearing to make my QoS-NSLP code work with the one of GIST, but I've ran into an issue I do not seem to be able to resolve.
I get my RecvMsg callback executed fine when sending a sample Resv from another node running the GIST qos_server and qos_client, like this:
Node A <-- Node B
running: running:
./nsis ./nsis
./nsis_qos_nslp ./qos_server (my code) ./qos_client RESERVE 10.10.2.2 2 0 RII REP
Any time I wish to send something from my code, GIST apologies with this:
(I issue commands within the code instead of passing cmd line args, listening to stdin with select() next to the unix sockets)
Node A --> Node B
running: running:
./nsis ./nsis
./nsis_qos_nslp ./qos_server (my code) ./qos_client RESERVE 10.10.2.2 2 0 RII REP
or
Node A --> Node B
running: running:
./nsis ./nsis
./nsis_qos_nslp ./nsis_qos_nslp (my code) (my code)
-> GistException: "No local IP address found for this outgoing message"
/Can this message occur because I'm using stdin() as well? /
I believe it is originating from:
//in: GistFsmBase.cpp
/** * Generate Network Layer Information object for local maschine * Warning: Object has to be deleted after use. */ GistNetworkLayerInfo * GistFsmBase::generateNetworkLayerInfo(char * ident, int identLength, IPaddr destIP, bool preferIPv6) { GistNetworkLayerInfo *netlayerInfo; netlayerInfo = new GistNetworkLayerInfo(); netlayerInfo->setPeerIdentity(ident, identLength); IPaddr addr; addr.version = 0; /* IPaddr addr = GistConfiguration::general_localIP; if (preferIPv6) { addr.version = 6; }; */ if (!preferIPv6 && destIP.version == 4 && GistConfiguration::general_localIPv4count > 0) { for (int i = 0; i < GistConfiguration::general_localIPv4count; i++) { unsigned int mask = GistConfiguration::general_localIPv4Nets[i].mask; unsigned int tmpAddr = GistConfiguration::general_localIPv4Nets[i].net; if ((destIP.v4 & mask) == (tmpAddr & mask)) { addr = GistConfiguration::general_localIPv4s[i]; } } } if (preferIPv6 && destIP.version == 6 && GistConfiguration::general_localIPv6count > 0) { for (int i = 0; i < GistConfiguration::general_localIPv6count; i++) { unsigned char * mask = GistConfiguration::general_localIPv6Nets[i].mask; unsigned char * tmpAddr = GistConfiguration::general_localIPv6Nets[i].net; bool equal = true; for (int j = 0; j < 16; j++) { if ((destIP.v6[j] & mask[j]) != (tmpAddr[j] & mask[j])) { equal = false; break; }; }; if (equal) { addr = GistConfiguration::general_localIPv6s[i]; } } } if (addr.version == 0) { ------->> throw new GistException("No local IP address found for this outgoing message"); }; netlayerInfo->setInterfaceAddr(addr); netlayerInfo->setIpTTL(64); netlayerInfo->setRouteStateValidityTime(CONFIG_GIST_MRS_VALIDITY_TIME); return netlayerInfo; }
I've checked my SendMessage(...) code, it seems to be fine. The nsis.conf and ifconfig and route configurations are the same.
I've also traced the contents of each structure, etc. I gave to this call.
Cheking the GIST code, I seached where you call SendMessage, and found:
//in: QosFsmQni.cpp
void QosFsmQni::sendMsg(QoSMessage *msg, void *args) {
QoSFsmData *data = (QoSFsmData *)args; msg_routing_info_path_coupled_t pc_mri; memset(&pc_mri, 0, sizeof(msg_routing_info_path_coupled_t)); pc_mri.msgRoutingMethod = GIST_DEFAULT_MRM; pc_mri.ipVersion = 4; // TODO: Use the _right_ outgoing address (christian.dickmann) pc_mri.srcAddr.v4.addr = data->server->localIPv4List[0].v4; pc_mri.destAddr.v4.addr = data->addr.v4; pc_mri.srcPrefix = 32; pc_mri.destPrefix = 32; pc_mri.d = DOWNSTREAM; pc_mri.p = 1; pc_mri.a = 1; pc_mri.b = 1; printf("srcAddr : %s\n", IPaddr::printIP(data->server->localIPv4List[0].v4)); printf("destAddr: %s\n", IPaddr::printIP(data->addr.v4)); printf ("msg length = %i\n",msg->getLength()); ----->> data->server->api->SendMessage((char *)msg->getBuffer(), msg->getLength(), NULL, QOS_NSLP_ID, (unsigned char *)data->sid, (msg_routing_info_base_t *)&pc_mri, NULL, NULL, true, false, false, 2000, 10); } and have few questions about this:
-> if using msg_routing_info_base_t* finally, why fill parts of msg_routing_info_path_coupled_t ? As I saw, it only uses srcAddr, destAddr, ipVersion, and msgRoutingMethod.
(anyway, what is the difference between these msg_routing methods?)
Thank you for your help and explanation,
Ferenc Pintér
(please reply to this letter, as I am not on the list) ( I tried to check the lists' archives without subscription, but got a forbidden error)
nsis_imp@informatik.uni-goettingen.de