Lines Matching +full:8 +full:mb
26 #define m_fc(mb) ((mb)->sm_data[0]) argument
72 static void smt_add_frame_len(SMbuf *mb, int len);
271 if (time - smc->sm.smt_last_lem >= TICKS_PER_SECOND*8) { in smt_event()
273 * Use 8 sec. for the time intervall, it simplifies the in smt_event()
352 /* If ratio is more than 5 in 8 seconds in smt_event()
460 void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs) in smt_received_pack() argument
468 switch (m_fc(mb)) { in smt_received_pack()
475 smt_free_mbuf(smc,mb) ; in smt_received_pack()
480 sm = smtod(mb,struct smt_header *) ; in smt_received_pack()
486 smt_free_mbuf(smc,mb) ; in smt_received_pack()
492 smt_free_mbuf(smc,mb) ; in smt_received_pack()
497 smt_swap_para(sm,(int) mb->sm_len,1) ; in smt_received_pack()
499 smt_type_name[m_fc(mb) & 0xf], sm); in smt_received_pack()
508 if (m_fc(mb) == FC_SMT_NSA && sm->smt_class == SMT_NIF && in smt_received_pack()
518 if ( (fs & A_INDICATOR) && m_fc(mb) == FC_SMT_NSA) { in smt_received_pack()
521 smt_free_mbuf(smc,mb) ; in smt_received_pack()
530 smt_free_mbuf(smc,mb) ; in smt_received_pack()
553 smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_VERSION,local) ; in smt_received_pack()
554 smt_free_mbuf(smc,mb) ; in smt_received_pack()
557 if ((sm->smt_len > mb->sm_len - sizeof(struct smt_header)) || in smt_received_pack()
560 smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_LENGTH,local) ; in smt_received_pack()
561 smt_free_mbuf(smc,mb) ; in smt_received_pack()
573 if (!(fs & C_INDICATOR) && m_fc(mb) == FC_SMT_NSA in smt_received_pack()
609 ((!(fs & A_INDICATOR) && m_fc(mb) == FC_SMT_NSA) || in smt_received_pack()
610 (m_fc(mb) != FC_SMT_NSA))) { in smt_received_pack()
722 smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_LENGTH, in smt_received_pack()
734 smt_send_frame(smc,mb,FC_SMT_INFO,local) ; in smt_received_pack()
746 fs = ess_raf_received_pack(smc,mb,sm,fs) ; in smt_received_pack()
760 smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_CLASS,local) ; in smt_received_pack()
780 smt_pmf_received_pack(smc,mb, local) ; in smt_received_pack()
796 smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_CLASS,local) ; in smt_received_pack()
803 smt_free_mbuf(smc,mb) ; in smt_received_pack()
824 void smt_send_frame(struct s_smc *smc, SMbuf *mb, int fc, int local) in smt_send_frame() argument
825 /* SMbuf *mb; buffer to send */ in smt_send_frame()
831 smt_free_mbuf(smc,mb) ; in smt_send_frame()
834 sm = smtod(mb,struct smt_header *) ; in smt_send_frame()
838 smt_swap_para(sm,(int) mb->sm_len,0) ; /* swap para & header */ in smt_send_frame()
841 smt_send_mbuf(smc,mb,local ? FC_SMT_LOC : fc) ; in smt_send_frame()
853 SMbuf *mb ; in smt_send_rdf() local
873 if (!(mb=smt_build_frame(smc,SMT_RDF,SMT_REPLY,sizeof(struct smt_rdf)))) in smt_send_rdf()
875 rdf = smtod(mb,struct smt_rdf *) ; in smt_send_rdf()
913 mb->sm_len += len ; in smt_send_rdf()
918 smt_send_frame(smc,mb,FC_SMT_INFO,local) ; in smt_send_rdf()
932 SMbuf *mb ; in smt_send_nif() local
934 if (!(mb = smt_build_frame(smc,SMT_NIF,type,sizeof(struct smt_nif)))) in smt_send_nif()
936 nif = smtod(mb, struct smt_nif *) ; in smt_send_nif()
946 smt_send_frame(smc,mb,fc,local) ; in smt_send_nif()
984 FC_SMT_INFO,tid, SMT_REQUEST, (SMT_TEST_ECHO_LEN & ~3)-8) ; in smt_echo_test()
999 SMbuf *mb ; in smt_send_ecf() local
1001 if (!(mb = smt_build_frame(smc,SMT_ECF,type,SMT_ECF_LEN + len))) in smt_send_ecf()
1003 ecf = smtod(mb, struct smt_ecf *) ; in smt_send_ecf()
1009 smt_send_frame(smc,mb,fc,0) ; in smt_send_ecf()
1022 SMbuf *mb ; in smt_send_sif_config() local
1024 if (!(mb = smt_build_frame(smc,SMT_SIF_CONFIG,SMT_REPLY, in smt_send_sif_config()
1028 sif = smtod(mb, struct smt_sif_config *) ; in smt_send_sif_config()
1040 smt_add_frame_len(mb,len) ; /* adjust length fields */ in smt_send_sif_config()
1042 smt_send_frame(smc,mb,FC_SMT_INFO,local) ; in smt_send_sif_config()
1055 SMbuf *mb ; in smt_send_sif_operation() local
1065 if (!(mb = smt_build_frame(smc,SMT_SIF_OPER,SMT_REPLY, in smt_send_sif_operation()
1068 sif = smtod(mb, typeof(sif)); in smt_send_sif_operation()
1091 smt_send_frame(smc,mb,FC_SMT_INFO,local) ; in smt_send_sif_operation()
1100 SMbuf *mb ; in smt_build_frame() local
1108 if (!(mb = smt_get_mbuf(smc))) in smt_build_frame()
1109 return mb; in smt_build_frame()
1111 mb->sm_len = length ; in smt_build_frame()
1112 smt = smtod(mb, struct smt_header *) ; in smt_build_frame()
1130 return mb; in smt_build_frame()
1133 static void smt_add_frame_len(SMbuf *mb, int len) in smt_add_frame_len() argument
1137 smt = smtod(mb, struct smt_header *) ; in smt_add_frame_len()
1139 mb->sm_len += len ; in smt_add_frame_len()
1234 p[1] = (u_char)((time>>(8+8+8+8-1)) & 1) ; in smt_set_timestamp()
1235 p[2] = (u_char)(time>>(8+8+8-1)) ; in smt_set_timestamp()
1236 p[3] = (u_char)(time>>(8+8-1)) ; in smt_set_timestamp()
1237 p[4] = (u_char)(time>>(8-1)) ; in smt_set_timestamp()
1239 p[6] = (u_char)(smc->sm.uniq_ticks>>8) ; in smt_set_timestamp()
1266 0,7,5,3,8,1,6,4,9,10,2,11,12,13,14,15 in smt_fill_policy()
1516 (char *)smc->mib.fddiSMTSetCount.timestamp,8) ; in smt_fill_setcount()
1696 SMbuf *mb ;
1701 mb = smt_get_mbuf() ;
1702 mb->sm_len = 3000+12 ;
1703 p = smtod(mb, char *) + 12 ;
1707 smt = smtod(mb, struct smt_header *) ;
1710 smt_send_mbuf(smc,mb,FC_ASYNC_LLC) ;
1799 return ((s>>8)&0xff) | ((s&0xff)<<8); in smt_swap_short()
1869 case '8' : in smt_string_swap()