Lines Matching refs:sl

592 	synclogent_t *sl;  local
651 (uio->uio_resid > sizeof(*sl))) {
652 sl = softs->synclog + softs->sl_tail++;
654 err = UIOMOVE(sl, sizeof(*sl), UIO_READ, uio);
703 synclist_t *sl; local
722 KMALLOC(sl, synclist_t *);
723 if (sl == NULL) {
753 is->is_sync = sl;
755 sl->sl_idx = -1;
756 sl->sl_ips = is;
757 bcopy(sp, &sl->sl_hdr, sizeof(struct synchdr));
762 sl->sl_pnext = softs->syncstatetab + hv;
763 sl->sl_next = softs->syncstatetab[hv];
765 softs->syncstatetab[hv]->sl_pnext = &sl->sl_next;
766 softs->syncstatetab[hv] = sl;
788 for (sl = softs->syncstatetab[hv]; (sl != NULL);
789 sl = sl->sl_next)
790 if (sl->sl_hdr.sm_num == sp->sm_num)
792 if (sl == NULL) {
806 sp->sm_num, sl->sl_hdr.sm_v, sl->sl_hdr.sm_p,
807 sl->sl_hdr.sm_cmd, sl->sl_hdr.sm_table,
808 sl->sl_hdr.sm_rev);
810 is = sl->sl_ips;
865 ipf_sync_del(softs, sl) in ipf_sync_del() argument
867 synclist_t *sl;
869 *sl->sl_pnext = sl->sl_next;
870 if (sl->sl_next != NULL)
871 sl->sl_next->sl_pnext = sl->sl_pnext;
872 if (sl->sl_idx != -1)
873 softs->syncupd[sl->sl_idx].sup_hdr.sm_sl = NULL;
885 ipf_sync_del_state(arg, sl) in ipf_sync_del_state() argument
887 synclist_t *sl;
892 ipf_sync_del(softs, sl);
894 KFREE(sl);
906 ipf_sync_del_nat(arg, sl) in ipf_sync_del_nat() argument
908 synclist_t *sl;
913 ipf_sync_del(softs, sl);
915 KFREE(sl);
940 synclist_t *sl; local
956 KMALLOC(sl, synclist_t *);
957 if (sl == NULL) {
969 n->nat_sync = sl;
970 n->nat_rev = sl->sl_rev;
972 sl->sl_idx = -1;
973 sl->sl_ipn = n;
974 sl->sl_num = ntohl(sp->sm_num);
977 sl->sl_pnext = softs->syncnattab + hv;
978 sl->sl_next = softs->syncnattab[hv];
980 softs->syncnattab[hv]->sl_pnext = &sl->sl_next;
981 softs->syncnattab[hv] = sl;
989 for (sl = softs->syncnattab[hv]; (sl != NULL);
990 sl = sl->sl_next)
991 if (sl->sl_hdr.sm_num == sp->sm_num)
993 if (sl == NULL) {
1001 nat = sl->sl_ipn;
1002 nat->nat_rev = sl->sl_rev;
1042 synclist_t *sl, *ss; local
1048 KMALLOC(sl, synclist_t *);
1049 if (sl == NULL)
1086 sl->sl_pnext = softs->syncstatetab + hv;
1087 sl->sl_next = softs->syncstatetab[hv];
1088 softs->syncstatetab[hv] = sl;
1103 sl->sl_pnext = softs->syncnattab + hv;
1104 sl->sl_next = softs->syncnattab[hv];
1105 softs->syncnattab[hv] = sl;
1112 sl->sl_num = softs->ipf_sync_num;
1115 sl->sl_magic = htonl(SYNHDRMAGIC);
1116 sl->sl_v = fin->fin_v;
1117 sl->sl_p = fin->fin_p;
1118 sl->sl_cmd = SMC_CREATE;
1119 sl->sl_idx = -1;
1120 sl->sl_table = tab;
1121 sl->sl_rev = fin->fin_rev;
1123 sl->sl_ips = ptr;
1124 sz = sizeof(*sl->sl_ips);
1126 sl->sl_ipn = ptr;
1127 sz = sizeof(*sl->sl_ipn);
1132 sl->sl_len = sz;
1140 bcopy((char *)&sl->sl_hdr, (char *)&sle->sle_hdr,
1155 return sl;
1170 ipf_sync_update(softc, tab, fin, sl) in ipf_sync_update() argument
1174 synclist_t *sl;
1183 if (fin->fin_out == 0 || sl == NULL)
1193 if (sl->sl_idx == -1) {
1196 sl->sl_idx = softs->su_idx++;
1199 bcopy((char *)&sl->sl_hdr, (char *)&slu->sup_hdr,
1202 slu->sup_hdr.sm_sl = sl;
1205 slu->sup_hdr.sm_num = htonl(sl->sl_num);
1215 slu = softs->syncupd + sl->sl_idx;
1224 ips = sl->sl_ips;
1235 nat = sl->sl_ipn;
1261 synclist_t *sl; local
1267 while ((sl = table[i]) != NULL) {
1268 switch (sl->sl_table) {
1270 if (sl->sl_ips != NULL)
1271 sl->sl_ips->is_sync = NULL;
1274 if (sl->sl_ipn != NULL)
1275 sl->sl_ipn->nat_sync = NULL;
1278 if (sl->sl_next != NULL)
1279 sl->sl_next->sl_pnext = sl->sl_pnext;
1280 table[i] = sl->sl_next;
1281 if (sl->sl_idx != -1)
1282 softs->syncupd[sl->sl_idx].sup_hdr.sm_sl = NULL;
1283 KFREE(sl);