Lines Matching refs:sl
579 synclogent_t *sl;
638 (uio->uio_resid > sizeof(*sl))) {
639 sl = softs->synclog + softs->sl_tail++;
641 err = UIOMOVE(sl, sizeof(*sl), UIO_READ, uio);
687 synclist_t *sl;
706 KMALLOC(sl, synclist_t *);
707 if (sl == NULL) {
737 is->is_sync = sl;
739 sl->sl_idx = -1;
740 sl->sl_ips = is;
741 bcopy(sp, &sl->sl_hdr, sizeof(struct synchdr));
746 sl->sl_pnext = softs->syncstatetab + hv;
747 sl->sl_next = softs->syncstatetab[hv];
749 softs->syncstatetab[hv]->sl_pnext = &sl->sl_next;
750 softs->syncstatetab[hv] = sl;
772 for (sl = softs->syncstatetab[hv]; (sl != NULL);
773 sl = sl->sl_next)
774 if (sl->sl_hdr.sm_num == sp->sm_num)
776 if (sl == NULL) {
790 sp->sm_num, sl->sl_hdr.sm_v, sl->sl_hdr.sm_p,
791 sl->sl_hdr.sm_cmd, sl->sl_hdr.sm_table,
792 sl->sl_hdr.sm_rev);
794 is = sl->sl_ips;
844 /* Parameters: sl(I) - pointer to synclist object to delete */
849 ipf_sync_del(ipf_sync_softc_t *softs, synclist_t *sl)
851 *sl->sl_pnext = sl->sl_next;
852 if (sl->sl_next != NULL)
853 sl->sl_next->sl_pnext = sl->sl_pnext;
854 if (sl->sl_idx != -1)
855 softs->syncupd[sl->sl_idx].sup_hdr.sm_sl = NULL;
862 /* Parameters: sl(I) - pointer to synclist object to delete */
867 ipf_sync_del_state(void *arg, synclist_t *sl)
872 ipf_sync_del(softs, sl);
874 KFREE(sl);
881 /* Parameters: sl(I) - pointer to synclist object to delete */
886 ipf_sync_del_nat(void *arg, synclist_t *sl)
891 ipf_sync_del(softs, sl);
893 KFREE(sl);
915 synclist_t *sl;
931 KMALLOC(sl, synclist_t *);
932 if (sl == NULL) {
944 n->nat_sync = sl;
945 n->nat_rev = sl->sl_rev;
947 sl->sl_idx = -1;
948 sl->sl_ipn = n;
949 sl->sl_num = ntohl(sp->sm_num);
952 sl->sl_pnext = softs->syncnattab + hv;
953 sl->sl_next = softs->syncnattab[hv];
955 softs->syncnattab[hv]->sl_pnext = &sl->sl_next;
956 softs->syncnattab[hv] = sl;
964 for (sl = softs->syncnattab[hv]; (sl != NULL);
965 sl = sl->sl_next)
966 if (sl->sl_hdr.sm_num == sp->sm_num)
968 if (sl == NULL) {
976 nat = sl->sl_ipn;
977 nat->nat_rev = sl->sl_rev;
1013 synclist_t *sl, *ss;
1019 KMALLOC(sl, synclist_t *);
1020 if (sl == NULL)
1057 sl->sl_pnext = softs->syncstatetab + hv;
1058 sl->sl_next = softs->syncstatetab[hv];
1059 softs->syncstatetab[hv] = sl;
1074 sl->sl_pnext = softs->syncnattab + hv;
1075 sl->sl_next = softs->syncnattab[hv];
1076 softs->syncnattab[hv] = sl;
1083 sl->sl_num = softs->ipf_sync_num;
1086 sl->sl_magic = htonl(SYNHDRMAGIC);
1087 sl->sl_v = fin->fin_v;
1088 sl->sl_p = fin->fin_p;
1089 sl->sl_cmd = SMC_CREATE;
1090 sl->sl_idx = -1;
1091 sl->sl_table = tab;
1092 sl->sl_rev = fin->fin_rev;
1094 sl->sl_ips = ptr;
1095 sz = sizeof(*sl->sl_ips);
1097 sl->sl_ipn = ptr;
1098 sz = sizeof(*sl->sl_ipn);
1103 sl->sl_len = sz;
1111 bcopy((char *)&sl->sl_hdr, (char *)&sle->sle_hdr,
1126 return sl;
1135 /* sl(I) - pointer to synchronisation object */
1142 synclist_t *sl)
1151 if (fin->fin_out == 0 || sl == NULL)
1161 if (sl->sl_idx == -1) {
1164 sl->sl_idx = softs->su_idx++;
1167 bcopy((char *)&sl->sl_hdr, (char *)&slu->sup_hdr,
1170 slu->sup_hdr.sm_sl = sl;
1173 slu->sup_hdr.sm_num = htonl(sl->sl_num);
1183 slu = softs->syncupd + sl->sl_idx;
1192 ips = sl->sl_ips;
1203 nat = sl->sl_ipn;
1226 synclist_t *sl;
1232 while ((sl = table[i]) != NULL) {
1233 switch (sl->sl_table) {
1235 if (sl->sl_ips != NULL)
1236 sl->sl_ips->is_sync = NULL;
1239 if (sl->sl_ipn != NULL)
1240 sl->sl_ipn->nat_sync = NULL;
1243 if (sl->sl_next != NULL)
1244 sl->sl_next->sl_pnext = sl->sl_pnext;
1245 table[i] = sl->sl_next;
1246 if (sl->sl_idx != -1)
1247 softs->syncupd[sl->sl_idx].sup_hdr.sm_sl = NULL;
1248 KFREE(sl);