Skip to content

Instantly share code, notes, and snippets.

@Napat
Created May 9, 2016 11:32
Show Gist options
  • Save Napat/35d4a42f584cf90d8ab6e32b7fae419b to your computer and use it in GitHub Desktop.
Save Napat/35d4a42f584cf90d8ab6e32b7fae419b to your computer and use it in GitHub Desktop.
#define UDP_MSGQ_GPON_PORT 7065
#define UDP_MSGQ_GPON_COMM_PORT 7066
#define UDP_MSGQ_GPON_MIP_CTRL_MSG_IDEN 108
#define UDP_MSGQ_GPON_INTERFACE "eth0.4091"
struct udpMsgQKey key;
struct udpMsgQ msgq;
int Init_msgQ(void) {
msgq.port = UDP_MSGQ_GPON_COMM_PORT; //send to port
memset(msgq.ip, 0, 20);
strcpy(msgq.ip, ip_addr_to_str(management_cpu_get_ip(management_cpu_handler(), MANAGEMENT_CPU_A)) ); // send to ip
// if (udpMsgGet(&key, UDP_MSGQ_GPON_MIP_CTRL_MSG_IDEN, UDP_MSGQ_GPON_PORT, "fn0.4091") != 0) {
if (udpMsgGet(&key, UDP_MSGQ_GPON_MIP_CTRL_MSG_IDEN, UDP_MSGQ_GPON_PORT, UDP_MSGQ_GPON_INTERFACE) != 0) {
//if(udpMsgGet(&key, UDP_MSGQ_PON_MSG_IDEN,UDP_MSGQ_PON_COMM_PORT , "eth0") != 0){
printf("udpMsgGet Failed\n");
}
printf("Init MsgQ Done\r\n");
return 0;
}
@Napat
Copy link
Author

Napat commented May 9, 2016

printf("udpMsgGet Failed\n"); ออกมาตลอด

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment