Lines Matching refs:mb

34 #define m_fc(mb)	((mb)->sm_data[0])
81 static void smt_add_frame_len(SMbuf *mb, int len);
469 void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
477 switch (m_fc(mb)) {
484 smt_free_mbuf(smc,mb) ;
489 sm = smtod(mb,struct smt_header *) ;
495 smt_free_mbuf(smc,mb) ;
501 smt_free_mbuf(smc,mb) ;
506 smt_swap_para(sm,(int) mb->sm_len,1) ;
508 smt_type_name[m_fc(mb) & 0xf],sm) ;
516 if (m_fc(mb) == FC_SMT_NSA && sm->smt_class == SMT_NIF &&
526 if ( (fs & A_INDICATOR) && m_fc(mb) == FC_SMT_NSA) {
529 smt_free_mbuf(smc,mb) ;
538 smt_free_mbuf(smc,mb) ;
561 smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_VERSION,local) ;
562 smt_free_mbuf(smc,mb) ;
565 if ((sm->smt_len > mb->sm_len - sizeof(struct smt_header)) ||
568 smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_LENGTH,local) ;
569 smt_free_mbuf(smc,mb) ;
581 if (!(fs & C_INDICATOR) && m_fc(mb) == FC_SMT_NSA
617 ((!(fs & A_INDICATOR) && m_fc(mb) == FC_SMT_NSA) ||
618 (m_fc(mb) != FC_SMT_NSA))) {
730 smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_LENGTH,
742 smt_send_frame(smc,mb,FC_SMT_INFO,local) ;
754 fs = ess_raf_received_pack(smc,mb,sm,fs) ;
768 smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_CLASS,local) ;
788 smt_pmf_received_pack(smc,mb, local) ;
804 smt_send_rdf(smc,mb,m_fc(mb),SMT_RDF_CLASS,local) ;
812 smt_free_mbuf(smc,mb) ;
833 void smt_send_frame(struct s_smc *smc, SMbuf *mb, int fc, int local)
834 /* SMbuf *mb; buffer to send */
840 smt_free_mbuf(smc,mb) ;
843 sm = smtod(mb,struct smt_header *) ;
847 smt_swap_para(sm,(int) mb->sm_len,0) ; /* swap para & header */
850 smt_send_mbuf(smc,mb,local ? FC_SMT_LOC : fc) ;
862 SMbuf *mb ;
882 if (!(mb=smt_build_frame(smc,SMT_RDF,SMT_REPLY,sizeof(struct smt_rdf))))
884 rdf = smtod(mb,struct smt_rdf *) ;
922 mb->sm_len += len ;
927 smt_send_frame(smc,mb,FC_SMT_INFO,local) ;
941 SMbuf *mb ;
943 if (!(mb = smt_build_frame(smc,SMT_NIF,type,sizeof(struct smt_nif))))
945 nif = smtod(mb, struct smt_nif *) ;
955 smt_send_frame(smc,mb,fc,local) ;
1008 SMbuf *mb ;
1010 if (!(mb = smt_build_frame(smc,SMT_ECF,type,SMT_ECF_LEN + len)))
1012 ecf = smtod(mb, struct smt_ecf *) ;
1018 smt_send_frame(smc,mb,fc,0) ;
1031 SMbuf *mb ;
1033 if (!(mb = smt_build_frame(smc,SMT_SIF_CONFIG,SMT_REPLY,
1037 sif = smtod(mb, struct smt_sif_config *) ;
1049 smt_add_frame_len(mb,len) ; /* adjust length fields */
1051 smt_send_frame(smc,mb,FC_SMT_INFO,local) ;
1064 SMbuf *mb ;
1074 if (!(mb = smt_build_frame(smc,SMT_SIF_OPER,SMT_REPLY,
1077 sif = smtod(mb, struct smt_sif_operation *) ;
1100 smt_send_frame(smc,mb,FC_SMT_INFO,local) ;
1109 SMbuf *mb ;
1117 if (!(mb = smt_get_mbuf(smc)))
1118 return mb;
1120 mb->sm_len = length ;
1121 smt = smtod(mb, struct smt_header *) ;
1139 return mb;
1142 static void smt_add_frame_len(SMbuf *mb, int len)
1146 smt = smtod(mb, struct smt_header *) ;
1148 mb->sm_len += len ;
1704 SMbuf *mb ;
1709 mb = smt_get_mbuf() ;
1710 mb->sm_len = 3000+12 ;
1711 p = smtod(mb, char *) + 12 ;
1715 smt = smtod(mb, struct smt_header *) ;
1718 smt_send_mbuf(smc,mb,FC_ASYNC_LLC) ;