This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-tfe/platform/test/test_sender_scm.cpp

41 lines
837 B
C++
Raw Normal View History

2019-06-02 15:10:57 +08:00
#include "tfe_types.h"
#include "tfe_utils.h"
#include "sender_scm.h"
#include "tfe_cmsg.h"
2019-06-02 16:29:43 +08:00
int main()
{
return 0;
}
#if 0
2019-06-02 15:10:57 +08:00
int main(){
struct tfe_cmsg *cmsg = tfe_cmsg_init();
if(cmsg == NULL){
printf("Failed at call tfe_cmsg_init\n");
}
//set
uint32_t value = 0x12345678;
int ret = tfe_cmsg_set(cmsg, TFE_CMSG_TCP_RESTORE_SEQ, (const unsigned char*)(&value), 4);
if(ret < 0){
printf("Failed at call tfe_cmsg_set: ret is %d\n", ret);
return -1;
}
//sender_scm
const char *profile = "../../conf/tfe/tfe.conf";
struct sender_scm* sender = sender_scm_init(profile, NULL);
if(sender == NULL){
printf("Failed at call sender_scm_init\n");
return -1;
}
ret = sender_scm_cmsg_send(sender, cmsg);
if(ret < 0){
printf("Failed at call sender_scm_cmsg_send, ret is %d\n", ret);
return -1;
}
return 0;
}
2019-06-02 16:29:43 +08:00
#endif