Juniper JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010 Manual page 263

Junos xml management protocol guide
Hide thumbs Also See for JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010:
Table of Contents

Advertisement

Copyright © 2010, Juniper Networks, Inc.
conf_chg = 1;
//--Set conf_chg value to 1 to signify that a --//
//--commit is needed--//
}
count_x++;
//--increment pim result buffer--//
count_y=0;
//--reset igmp result buffer to start--//
//-- at first element--//
count_z=0;
//--reset group match to 0 --//
//--(config needed due to no match)--/
}
//--Code for comparing igmp static membership to pim groups--//
count_x=0;
count_y=0;
count_z=0;
while(strstr(igmp_result_buff[count_y], "2") != NULL) {
if(strstr(pim_result_buff[count_x], "2") == NULL) {
count_z = 0;
conf_chg = 1;
}
while(strstr(pim_result_buff[count_x], "2") != NULL) {
if(strcmp(pim_result_buff[count_x], igmp_result_buff[count_y]) == 0) {
count_z = 1;
}
count_x++;
}
if(count_z == 0) {
printf("Removing this group from igmp: %s\n", igmp_result_buff[count_y]);
sprintf(temp_buff, js_rmv_group, minterface, igmp_result_buff[count_y]);
#ifdef PRINT
printf("%s", temp_buff);
#endif
sock_bytes = write(sockfd, temp_buff, strlen(temp_buff));
while(strstr(small_buff, "</rpc-reply>") == NULL) {
sock_bytes = read(sockfd, rcvbuffer, 255);
rcvbuffer[sock_bytes] = 0;
strcat(small_buff, rcvbuffer);
}
#ifdef PRINT
printf("%s\n", rcvbuffer);
#endif
bzero(small_buff, strlen(small_buff));
bzero(temp_buff, strlen(temp_buff));
conf_chg = 1;
}
count_y++;
count_x=0;
count_z=0;
}
if(conf_chg == 1) {
sock_bytes = write(sockfd, js_commit, strlen(js_commit));
while(strstr(small_buff, "</rpc-reply>") == NULL) {
sock_bytes = read(sockfd, rcvbuffer, 255);
rcvbuffer[sock_bytes] = 0;
strcat(small_buff, rcvbuffer);
Chapter 10: Writing Junos XML Protocol C Client Applications
241

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junos os

Table of Contents