Operating System - HP-UX
1752725 Members
5723 Online
108789 Solutions
New Discussion юеВ

Re: Problem with OAMM3UA stack creation API

 
astra
Frequent Advisor

Problem with OAMM3UA stack creation API

Hi All,

I have a issue with HPOC M3ua OAM API.
When I am creating the SS7 stack the return value which I m getting is -1.

I checked the ss7error.h file to find this error then I am getting
EAPINOERROR = 0 , /* no API error


I am not getting the exact meaning of this error, why this error is coming.

This is the sample code.
//Test.c
extern int ss7errno;
int main(){
int ret_val=0;
int m3uaCnxId=0;
char className[16] = "SS7_Stack_1";
ss7_service_parms sceparms;
ss7_sce_type sceType;
memset(&sceparms,0,sizeof(sceparms));
ret_val = SS7_xifcreate(className,ss7_oam_m3ua,&sceparms,NULL,&m3uaCnxId,NULL);
printf("SS7_xifcreate ret_val %d\n", ret_val);
return 0;
}

Output:
bash-2.05b# ./a.out
SS7_xifcreate ret_val -1

Please tell me where I am doing wrong if somebody has idea.

Regrads,
Amit
3 REPLIES 3
Shinji Teragaito_1
Respected Contributor

Re: Problem with OAMM3UA stack creation API

Hi,

Specifying ssn and mode members may resolv your problem. Refer to Example 5-1 in the following page:

http://docs.hp.com/en/5971-3502/ch05s04.html

Shinji
astra
Frequent Advisor

Re: Problem with OAMM3UA stack creation API

Thanks,
I think you are suggesting this:
sceparms.ssn = client_ssn;
sceparms.mode = SCCP_ITU_WHITEBOOK

Here when I create M3UA stack I does not show which type of Book it will use it is taking bye default.

In conf file there are two option about mode
a) SCCP_ITU_WHITEBOOK b) Regular book

The link is provided by you is saying some change in sys..api could you change what would be change in that conf file.

-Amit

astra
Frequent Advisor

Re: Problem with OAMM3UA stack creation API

hi All,

Now according to ur suggestion I modified the sample code:

//Test.c

int main(){

char className[16] = "SS7_Stack_1";
int result;
int cnxId;
int user_pc;
ss7_service_parms sceParms;
ss7_sce_type sceType;
ss7_cnx_info cnxInfo;
ss7_add_info_list addInfoList;
ss7_add_info addInfo;
void * cnxPtr;

sceParms.ssn = 87;
sceParms.mode = SCCP_REGULAR_MODE;

cnxInfo.cnx_mode = ss7_cnx_primary;
addInfo.parm_length = sizeof(int);
addInfoList.list = &addInfo;
cnxInfo.add_info = &addInfoList;
cnxPtr = &cnxInfo;

result = SS7_xifcreate(className,
ss7_sccp,
&sceParms,
cnxPtr,
&cnxId,
NULL ) ;

printf("ss7Error:%d\n",ss7errno);
printf("ss7Error:%d\n",cnxId);

return 0;

}

output:
bash-2.05b# ./a.out
ss7Error:3
Means:
EAPICONNECT , /* Cannot establish connection with SS7

Please share your opinion what would be the cause.

regards,
Amit