FACT++  1.0
void rout ( int *  tag,
char *  buf,
int *  size 
)

Definition at line 62 of file test_client.c.

References buff, TT::c, client_str, TT::d, dic_get_dns_node(), dic_get_timestamp(), TT::f, TT::i, my_ctime, TT::s, str, and TT::str.

Referenced by main().

65 {
66 /*
67  char *format;
68  format = dic_get_format(0);
69  printf("Received format = %s %08x, %d\n",format, format, *size);
70 */
71  if(*tag == 1100)
72  {
73  printf("Received ONCE_ONLY : %s\n",buff);
74  return;
75  }
76  if(*tag == 1200)
77  {
78  char node[128], str[256];
79  int secs, millis;
80  time_t tsecs;
81 
82  dic_get_dns_node(node);
83  printf("DNS node = %s\n",node);
84  printf("size = %d\n",*size);
85  memcpy(&t, buf, (size_t)*size);
86  printf("t.i = %d, t.d = %2.2f, t.s = %d, t.c = %c, t.f = %2.2f, t.str = %s\n",
87  t.i,t.d,t.s,t.c,t.f,t.str);
88  dic_get_timestamp(0, &secs, &millis);
89  tsecs = secs;
90  my_ctime(&tsecs, str, 128);
91  str[(int)strlen(str)-1] = '\0';
92  printf("timestamp = %s.%d\n",str,millis);
93 
94  return;
95  }
96  else
97  printf("%s Received %s for Service%03d\n",client_str,buf,*tag);
98 
99 /*
100  if(conn_id = dic_get_server(server))
101  printf("received from %d, %s\n",conn_id, server);
102 */
103 
104 }
#define my_ctime(t, str, size)
Definition: dim_common.h:275
Definition: dns.c:26
char str[20]
Definition: test_client.c:23
float f
Definition: test_client.c:22
char str[80]
Definition: test_client.c:7
short s
Definition: test_client.c:19
int dic_get_dns_node(char *node)
Definition: open_dns.c:81
char c
Definition: test_client.c:20
int i
Definition: test_client.c:15
int size
Definition: db_dim_server.c:17
char client_str[80]
Definition: test_client.c:9
char buff[80]
Definition: test_client.c:12
double d
Definition: test_client.c:18
TT t
Definition: test_client.c:26
int dic_get_timestamp(unsigned serv_id, int *secs, int *milisecs)
Definition: dic.c:984

+ Here is the call graph for this function:

+ Here is the caller graph for this function: