Lines Matching refs:algo
155 uint16_t *mymin, uint16_t *mymax, uint16_t **pnext_ephemeral, int algo) in pcb_getports() argument
227 [portalgo_af][portalgo_range][algo]; in pcb_getports()
374 algo_bsd(int algo, uint16_t *port, struct inpcb *inp, kauth_cred_t cred) in algo_bsd() argument
383 &next_ephemeral, algo); in algo_bsd()
410 algo_random_start(int algo, uint16_t *port, struct inpcb *inp, in algo_random_start() argument
421 &next_ephemeral, algo); in algo_random_start()
464 algo_random_pick(int algo, uint16_t *port, struct inpcb *inp, in algo_random_pick() argument
475 &next_ephemeral, algo); in algo_random_pick()
602 algo_hash(int algo, uint16_t *port, struct inpcb *inp, in algo_hash() argument
614 &next_ephemeral, algo); in algo_hash()
651 algo_doublehash(int algo, uint16_t *port, struct inpcb *inp, in algo_doublehash() argument
665 &next_ephemeral, algo); in algo_doublehash()
704 algo_randinc(int algo, uint16_t *port, struct inpcb *inp, in algo_randinc() argument
717 &next_ephemeral, algo); in algo_randinc()
749 int algo, error; in portalgo_randport() local
772 algo = PORTALGO_BSD; in portalgo_randport()
774 algo = default_algo; in portalgo_randport()
777 algo = inp->inp_portalgo; in portalgo_randport()
779 KASSERT(algo >= 0); in portalgo_randport()
780 KASSERT(algo < NALGOS); in portalgo_randport()
808 DPRINTF("%s portalgo = %d\n", __func__, algo); in portalgo_randport()
810 error = (*algos[algo].func)(algo, &lport, inp, cred); in portalgo_randport()
817 &mymax, &pnext_ephemeral, algo); in portalgo_randport()
827 portalgo_algo_name_select(const char *name, int *algo) in portalgo_algo_name_select() argument
836 *algo = ai; in portalgo_algo_name_select()
844 portalgo_algo_index_select(struct inpcb *inp, int algo) in portalgo_algo_index_select() argument
847 DPRINTF("%s called with algo %d for pcb %p\n", __func__, algo, inp ); in portalgo_algo_index_select()
849 if ((algo < 0 || algo >= NALGOS) && in portalgo_algo_index_select()
850 (algo != PORTALGO_DEFAULT)) in portalgo_algo_index_select()
853 inp->inp_portalgo = algo; in portalgo_algo_index_select()
862 sysctl_portalgo_selected(SYSCTLFN_ARGS, int *algo) in sysctl_portalgo_selected() argument
870 strlcpy(newalgo, algos[*algo].name, sizeof(newalgo)); in sysctl_portalgo_selected()
881 strncmp(newalgo, algos[*algo].name, sizeof(newalgo)) == 0) in sysctl_portalgo_selected()
892 error = portalgo_algo_name_select(newalgo, algo); in sysctl_portalgo_selected()