FACT++  1.0
int send_dns_update_packet ( DIS_DNS_CONN dnsp)

Definition at line 735 of file dis_old.c.

References DIS_DNS_HEADER, dis_dns_ent::dis_dns_packet, dna_write(), dis_dns_ent::dns_dis_conn_id, DIS_DNS_PACKET::n_services, release_conn(), SERVICE_REG::service_name, DIS_DNS_PACKET::services, and DIS_DNS_PACKET::size.

Referenced by register_services().

736 {
737  DIS_DNS_PACKET *dis_dns_p = &(dnsp->dis_dns_packet);
738  int n_services;
739  SERVICE_REG *serv_regp;
740 
741  n_services = 1;
742  dis_dns_p->n_services = htovl(n_services);
743  dis_dns_p->size = htovl(DIS_DNS_HEADER +
744  n_services * sizeof(SERVICE_REG));
745  serv_regp = dis_dns_p->services;
746  strcpy( serv_regp->service_name, "DUMMY_UPDATE_PACKET" );
747  if(dnsp->dns_dis_conn_id > 0)
748  {
749  if( !dna_write(dnsp->dns_dis_conn_id, &(dnsp->dis_dns_packet),
750  DIS_DNS_HEADER + n_services * sizeof(SERVICE_REG)))
751  {
752  release_conn(dnsp->dns_dis_conn_id, 0, 1);
753  }
754  }
755  return(1);
756 }
int dns_dis_conn_id
Definition: dis.c:44
int dna_write(int conn_id, void *buffer, int size)
Definition: dna.c:455
char service_name[MAX_NAME]
Definition: dim.h:264
int n_services
Definition: dim.h:279
int size
Definition: dim.h:270
static int release_conn(int conn_id, int print_flg, int dns_flag)
Definition: dis_old.c:2374
#define DIS_DNS_HEADER
Definition: dim.h:283
SERVICE_REG services[MAX_SERVICE_UNIT]
Definition: dim.h:280
DIS_DNS_PACKET dis_dns_packet
Definition: dis.c:42

+ Here is the call graph for this function:

+ Here is the caller graph for this function: