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