static void smt_send_sif_config(struct s_smc *smc, struct fddi_addr *dest, u_long tid, int local) { struct smt_sif_config *sif ; SMbuf *mb ; int len ; if (!(mb = smt_build_frame(smc,SMT_SIF_CONFIG,SMT_REPLY, SIZEOF_SMT_SIF_CONFIG))) return ; sif = smtod(mb, struct smt_sif_config *) ; smt_fill_timestamp(smc,&sif->ts) ; smt_fill_sde(smc,&sif->sde) ; smt_fill_version(smc,&sif->version) ; smt_fill_state(smc,&sif->state) ; smt_fill_policy(smc,&sif->policy) ; smt_fill_latency(smc,&sif->latency); smt_fill_neighbor(smc,&sif->neighbor); smt_fill_setcount(smc,&sif->setcount) ; len = smt_fill_path(smc,&sif->path); sif->smt.smt_dest = *dest ; sif->smt.smt_tid = tid ; smt_add_frame_len(mb,len) ; dump_smt(smc,(struct smt_header *)sif,"SIF Configuration Reply") ; smt_send_frame(smc,mb,FC_SMT_INFO,local) ; }
static void smt_send_sif_config(struct s_smc *smc, struct fddi_addr *dest, u_long tid, int local) /* struct fddi_addr *dest; dest address */ /* u_long tid; transaction id */ { struct smt_sif_config *sif ; SMbuf *mb ; int len ; if (!(mb = smt_build_frame(smc,SMT_SIF_CONFIG,SMT_REPLY, SIZEOF_SMT_SIF_CONFIG))) return ; sif = smtod(mb, struct smt_sif_config *) ; smt_fill_timestamp(smc,&sif->ts) ; /* set time stamp */ smt_fill_sde(smc,&sif->sde) ; /* set station descriptor */ smt_fill_version(smc,&sif->version) ; /* set version information */ smt_fill_state(smc,&sif->state) ; /* set state information */ smt_fill_policy(smc,&sif->policy) ; /* set station policy */ smt_fill_latency(smc,&sif->latency); /* set station latency */ smt_fill_neighbor(smc,&sif->neighbor); /* set station neighbor */ smt_fill_setcount(smc,&sif->setcount) ; /* set count */ len = smt_fill_path(smc,&sif->path); /* set station path descriptor*/ sif->smt.smt_dest = *dest ; /* destination address */ sif->smt.smt_tid = tid ; /* transaction ID */ smt_add_frame_len(mb,len) ; /* adjust length fields */ dump_smt(smc,(struct smt_header *)sif,"SIF Configuration Reply") ; smt_send_frame(smc,mb,FC_SMT_INFO,local) ; }
static void smt_send_sif_operation(struct s_smc *smc, struct fddi_addr *dest, u_long tid, int local) /* struct fddi_addr *dest; dest address */ /* u_long tid; transaction id */ { struct smt_sif_operation *sif ; SMbuf *mb ; int ports ; int i ; ports = NUMPHYS ; #ifndef CONCENTRATOR if (smc->s.sas == SMT_SAS) ports = 1 ; #endif if (!(mb = smt_build_frame(smc,SMT_SIF_OPER,SMT_REPLY, SIZEOF_SMT_SIF_OPERATION+ports*sizeof(struct smt_p_lem)))) return ; sif = smtod(mb, struct smt_sif_operation *) ; smt_fill_timestamp(smc,&sif->ts) ; /* set time stamp */ smt_fill_mac_status(smc,&sif->status) ; /* set mac status */ smt_fill_mac_counter(smc,&sif->mc) ; /* set mac counter field */ smt_fill_mac_fnc(smc,&sif->fnc) ; /* set frame not copied counter */ smt_fill_manufacturer(smc,&sif->man) ; /* set manufacturer field */ smt_fill_user(smc,&sif->user) ; /* set user field */ smt_fill_setcount(smc,&sif->setcount) ; /* set count */ /* * set link error mon information */ if (ports == 1) { smt_fill_lem(smc,sif->lem,PS) ; } else { for (i = 0 ; i < ports ; i++) { smt_fill_lem(smc,&sif->lem[i],i) ; } } sif->smt.smt_dest = *dest ; /* destination address */ sif->smt.smt_tid = tid ; /* transaction ID */ dump_smt(smc,(struct smt_header *)sif,"SIF Operation Reply") ; smt_send_frame(smc,mb,FC_SMT_INFO,local) ; }