FreeBSD/sys/netpfil/ipfw/ip_fw_table.c
/*
 * Convert algorithm callback return code into
 * one of pre-defined states known by userland.
 */
Convert algorithm callback return code into
one of pre-defined states known by userland.
Convert algorithm callback return code into one of pre - defined states known by userland .
static void
store_tei_result(struct tentry_info *tei, int op, int error, uint32_t num)
{
	int flag;
	flag = 0;
	switch (error) {
	case 0:
		if (op == OP_ADD && num != 0)
			flag = TEI_FLAGS_ADDED;
		if (op == OP_DEL)
			flag = TEI_FLAGS_DELETED;
		break;
	case ENOENT:
		flag = TEI_FLAGS_NOTFOUND;
		break;
	case EEXIST:
		flag = TEI_FLAGS_EXISTS;
		break;
	default:
		flag = TEI_FLAGS_ERROR;
	}
	tei->flags |= flag;
}
static void store_tei_result ( struct tentry_info * tei , int op , int error , uint32_t num ) { int flag ; flag = 0 ; switch ( error ) { case 0 : if ( op == OP_ADD && num != 0 ) flag = TEI_FLAGS_ADDED ; if ( op == OP_DEL ) flag = TEI_FLAGS_DELETED ; break ; case ENOENT : flag = TEI_FLAGS_NOTFOUND ; break ; case EEXIST : flag = TEI_FLAGS_EXISTS ; break ; default : flag = TEI_FLAGS_ERROR ; } tei -> flags |= flag ; }
Convert algorithm callback return code into
 one of pre-defined states known by userland.
Convert algorithm callback return code into one of pre - defined states known by userland .