##############################################################################
# NOTICE: This File has been generated by scripts/pyslurm_bindgen.py, which
# uses the autopxd2 tool in order to generate Cython compatible definitions
# from the slurm.h C-Header file. Basically, this can be seen as a modified
# version of the original header, with the following changes:
#
# * have the correct cython syntax for type definitions, e.g. "typedef struct
# <name>" is converted to "ctypedef struct <name>"
# * C-Macros are listed with their appropriate uint type
# * Any definitions that cannot be translated are not included in this file
#
# Generated on 2026-02-12T20:29:47.128029
#
# The Original Copyright notice from slurm.h has been included
# below:
#
##############################################################################
#  slurm.h - Definitions for all of the Slurm RPCs
#############################################################################
#  Copyright (C) 2002-2007 The Regents of the University of California.
#  Copyright (C) 2008-2010 Lawrence Livermore National Security.
#  Portions Copyright (C) 2010-2017 SchedMD LLC <https://www.schedmd.com>.
#  Portions Copyright (C) 2012-2013 Los Alamos National Security, LLC.
#  Portions Copyright 2013 Hewlett Packard Enterprise Development LP
#  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
#  Written by Morris Jette <jette1@llnl.gov>, et. al.
#  CODE-OCEC-09-009. All rights reserved.
#
# Slurm is licensed under the GNU GPLv2. For the full text of Slurm's License,
# please see here: pyslurm/slurm/SLURM_LICENSE
#
# Please, as mentioned above, also have a look at Slurm's DISCLAIMER under
# pyslurm/slurm/SLURM_DISCLAIMER
##############################################################################
#
# Copyright (C) 2023 PySlurm Developers (Modifications as described above)
#
# This file is part of PySlurm
#
# PySlurm is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PySlurm is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with PySlurm; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

cdef extern from "slurm/slurm.h":

    uint8_t HOST_NAME_MAX
    uint8_t INFINITE8
    uint16_t INFINITE16
    uint32_t INFINITE
    uint64_t INFINITE64
    uint8_t NO_VAL8
    uint16_t NO_VAL16
    uint32_t NO_VAL
    uint64_t NO_VAL64
    uint64_t NO_CONSUME_VAL64
    uint8_t MAX_VAL8
    uint16_t MAX_VAL16
    uint32_t MAX_VAL
    uint64_t MAX_VAL64
    uint16_t MAX_TASKS_PER_NODE
    uint32_t MAX_JOB_ID
    uint32_t MAX_FED_JOB_ID
    uint8_t MAX_HET_JOB_COMPONENTS
    uint8_t MAX_FED_CLUSTERS
    uint16_t MAX_JOB_SIZE_BITMAP
    uint32_t MAX_SLURM_NODES
    uint32_t SLURM_MAX_NORMAL_STEP_ID
    uint32_t SLURM_PENDING_STEP
    uint32_t SLURM_EXTERN_CONT
    uint32_t SLURM_BATCH_SCRIPT
    uint32_t SLURM_INTERACTIVE_STEP
    uint8_t DEFAULT_EIO_SHUTDOWN_WAIT
    uint8_t JOB_STATE_BASE
    uint32_t JOB_STATE_FLAGS
    uint16_t JOB_LAUNCH_FAILED
    uint16_t JOB_GETENV_FAILED
    uint16_t JOB_REQUEUE
    uint16_t JOB_REQUEUE_HOLD
    uint16_t JOB_SPECIAL_EXIT
    uint16_t JOB_RESIZING
    uint16_t JOB_CONFIGURING
    uint16_t JOB_COMPLETING
    uint32_t JOB_STOPPED
    uint32_t JOB_RECONFIG_FAIL
    uint32_t JOB_POWER_UP_NODE
    uint32_t JOB_REVOKED
    uint32_t JOB_REQUEUE_FED
    uint32_t JOB_RESV_DEL_HOLD
    uint32_t JOB_SIGNALING
    uint32_t JOB_STAGE_OUT
    uint32_t JOB_EXPEDITING
    int8_t READY_JOB_FATAL
    int8_t READY_JOB_ERROR
    uint8_t READY_NODE_STATE
    uint8_t READY_JOB_STATE
    uint8_t READY_PROLOG_STATE
    uint8_t MAIL_JOB_BEGIN
    uint8_t MAIL_JOB_END
    uint8_t MAIL_JOB_FAIL
    uint8_t MAIL_JOB_REQUEUE
    uint8_t MAIL_JOB_TIME100
    uint8_t MAIL_JOB_TIME90
    uint8_t MAIL_JOB_TIME80
    uint8_t MAIL_JOB_TIME50
    uint16_t MAIL_JOB_STAGE_OUT
    uint16_t MAIL_ARRAY_TASKS
    uint16_t MAIL_INVALID_DEPEND
    uint8_t PARSE_FLAGS_IGNORE_NEW
    uint8_t PARSE_FLAGS_CHECK_PERMISSIONS
    uint8_t PARSE_FLAGS_INCLUDE_ONLY
    uint8_t ARRAY_TASK_REQUEUED
    uint32_t NICE_OFFSET
    uint8_t PARTITION_SUBMIT
    uint8_t PARTITION_SCHED
    uint8_t PARTITION_DOWN
    uint8_t PARTITION_UP
    uint8_t PARTITION_DRAIN
    uint8_t PARTITION_INACTIVE
    uint8_t PARTITION_ENFORCE_NONE
    uint8_t PARTITION_ENFORCE_ALL
    uint8_t PARTITION_ENFORCE_ANY
    uint8_t ACCT_GATHER_PROFILE_NOT_SET
    uint8_t ACCT_GATHER_PROFILE_NONE
    uint8_t ACCT_GATHER_PROFILE_ENERGY
    uint8_t ACCT_GATHER_PROFILE_TASK
    uint8_t ACCT_GATHER_PROFILE_LUSTRE
    uint8_t ACCT_GATHER_PROFILE_NETWORK
    uint32_t ACCT_GATHER_PROFILE_ALL
    uint16_t SLURM_DIST_STATE_BASE
    uint32_t SLURM_DIST_STATE_FLAGS
    uint32_t SLURM_DIST_PACK_NODES
    uint32_t SLURM_DIST_NO_PACK_NODES
    uint16_t SLURM_DIST_NODEMASK
    uint16_t SLURM_DIST_SOCKMASK
    uint16_t SLURM_DIST_COREMASK
    uint16_t SLURM_DIST_NODESOCKMASK
    uint8_t OPEN_MODE_APPEND
    uint8_t OPEN_MODE_TRUNCATE
    uint8_t CPU_BIND_T_TO_MASK
    uint32_t CPU_BIND_T_AUTO_TO_MASK
    uint16_t CPU_BIND_T_MASK
    uint32_t CPU_FREQ_RANGE_FLAG
    uint32_t CPU_FREQ_LOW
    uint32_t CPU_FREQ_MEDIUM
    uint32_t CPU_FREQ_HIGH
    uint32_t CPU_FREQ_HIGHM1
    uint32_t CPU_FREQ_CONSERVATIVE
    uint32_t CPU_FREQ_ONDEMAND
    uint32_t CPU_FREQ_PERFORMANCE
    uint32_t CPU_FREQ_POWERSAVE
    uint32_t CPU_FREQ_USERSPACE
    uint32_t CPU_FREQ_SCHEDUTIL
    uint32_t CPU_FREQ_GOV_MASK
    uint8_t MEM_BIND_TYPE_MASK
    uint8_t MEM_BIND_TYPE_FLAGS_MASK
    uint8_t NODE_STATE_BASE
    uint32_t NODE_STATE_FLAGS
    uint8_t NODE_STATE_EXTERNAL
    uint8_t NODE_STATE_RES
    uint8_t NODE_STATE_UNDRAIN
    uint8_t NODE_STATE_CLOUD
    uint16_t NODE_RESUME
    uint16_t NODE_STATE_DRAIN
    uint16_t NODE_STATE_COMPLETING
    uint16_t NODE_STATE_NO_RESPOND
    uint16_t NODE_STATE_POWERED_DOWN
    uint16_t NODE_STATE_FAIL
    uint16_t NODE_STATE_POWERING_UP
    uint16_t NODE_STATE_MAINT
    uint32_t NODE_STATE_REBOOT_REQUESTED
    uint32_t NODE_STATE_REBOOT_CANCEL
    uint32_t NODE_STATE_POWERING_DOWN
    uint32_t NODE_STATE_DYNAMIC_FUTURE
    uint32_t NODE_STATE_REBOOT_ISSUED
    uint32_t NODE_STATE_PLANNED
    uint32_t NODE_STATE_INVALID_REG
    uint32_t NODE_STATE_POWER_DOWN
    uint32_t NODE_STATE_POWER_UP
    uint32_t NODE_STATE_POWER_DRAIN
    uint32_t NODE_STATE_DYNAMIC_NORM
    uint32_t NODE_STATE_BLOCKED
    uint8_t NODE_CERT_TOKEN_SET
    uint8_t SHOW_ALL
    uint8_t SHOW_DETAIL
    uint8_t SHOW_MIXED
    uint8_t SHOW_LOCAL
    uint8_t SHOW_SIBLING
    uint8_t SHOW_FEDERATION
    uint8_t SHOW_FUTURE
    uint64_t MEM_PER_CPU
    uint16_t SHARED_FORCE
    uint8_t PRIVATE_DATA_JOBS
    uint8_t PRIVATE_DATA_NODES
    uint8_t PRIVATE_DATA_PARTITIONS
    uint8_t PRIVATE_DATA_USAGE
    uint8_t PRIVATE_DATA_USERS
    uint8_t PRIVATE_DATA_ACCOUNTS
    uint8_t PRIVATE_DATA_RESERVATIONS
    uint16_t PRIVATE_DATA_EVENTS
    uint8_t PRIORITY_RESET_NONE
    uint8_t PRIORITY_RESET_NOW
    uint8_t PRIORITY_RESET_DAILY
    uint8_t PRIORITY_RESET_WEEKLY
    uint8_t PRIORITY_RESET_MONTHLY
    uint8_t PRIORITY_RESET_QUARTERLY
    uint8_t PRIORITY_RESET_YEARLY
    uint8_t PROP_PRIO_OFF
    uint8_t PROP_PRIO_ON
    uint8_t PROP_PRIO_NICER
    uint8_t PRIORITY_FLAGS_ACCRUE_ALWAYS
    uint8_t PRIORITY_FLAGS_MAX_TRES
    uint8_t PRIORITY_FLAGS_SIZE_RELATIVE
    uint8_t PRIORITY_FLAGS_DEPTH_OBLIVIOUS
    uint8_t PRIORITY_FLAGS_CALCULATE_RUNNING
    uint8_t PRIORITY_FLAGS_FAIR_TREE
    uint8_t PRIORITY_FLAGS_INCR_ONLY
    uint8_t PRIORITY_FLAGS_NO_NORMAL_ASSOC
    uint16_t PRIORITY_FLAGS_NO_NORMAL_PART
    uint16_t PRIORITY_FLAGS_NO_NORMAL_QOS
    uint16_t PRIORITY_FLAGS_NO_NORMAL_TRES
    uint16_t PRIORITY_FLAGS_MAX_TRES_GRES
    uint8_t KILL_INV_DEP
    uint8_t NO_KILL_INV_DEP
    uint8_t HAS_STATE_DIR
    uint8_t BACKFILL_TEST
    uint8_t GRES_ENFORCE_BIND
    uint8_t TEST_NOW_ONLY
    uint8_t JOB_SEND_ENV
    uint8_t GRACE_PREEMPT
    uint16_t SPREAD_JOB
    uint16_t USE_MIN_NODES
    uint16_t JOB_KILL_HURRY
    uint16_t TRES_STR_CALC
    uint16_t SIB_JOB_FLUSH
    uint16_t HET_JOB_FLAG
    uint16_t JOB_NTASKS_SET
    uint16_t JOB_CPUS_SET
    uint32_t BF_WHOLE_NODE_TEST
    uint32_t TOP_PRIO_TMP
    uint32_t JOB_ACCRUE_OVER
    uint32_t GRES_DISABLE_BIND
    uint32_t JOB_WAS_RUNNING
    uint32_t RESET_ACCRUE_TIME
    uint32_t CRON_JOB
    uint32_t JOB_MEM_SET
    uint32_t EXTERNAL_JOB
    uint32_t USE_DEFAULT_ACCT
    uint32_t USE_DEFAULT_PART
    uint32_t USE_DEFAULT_QOS
    uint32_t USE_DEFAULT_WCKEY
    uint32_t JOB_DEPENDENT
    uint32_t JOB_MAGNETIC
    uint32_t JOB_PART_ASSIGNED
    uint64_t BACKFILL_SCHED
    uint64_t BACKFILL_LAST
    uint64_t TASKS_CHANGED
    uint64_t JOB_SEND_SCRIPT
    uint64_t RESET_LIC_TASK
    uint64_t RESET_LIC_JOB
    uint64_t GRES_ONE_TASK_PER_SHARING
    uint64_t GRES_MULT_TASKS_PER_SHARING
    uint64_t GRES_ALLOW_TASK_SHARING
    uint64_t STEPMGR_ENABLED
    uint64_t HETJOB_PURGE
    uint64_t SPREAD_SEGMENTS
    uint64_t CONSOLIDATE_SEGMENTS
    uint64_t EXPEDITED_REQUEUE
    uint8_t X11_FORWARD_ALL
    uint8_t X11_FORWARD_BATCH
    uint8_t X11_FORWARD_FIRST
    uint8_t X11_FORWARD_LAST
    uint8_t ALLOC_SID_ADMIN_HOLD
    uint8_t ALLOC_SID_USER_HOLD
    uint8_t JOB_SHARED_NONE
    uint8_t JOB_SHARED_OK
    uint8_t JOB_SHARED_USER
    uint8_t JOB_SHARED_MCS
    uint8_t JOB_SHARED_TOPO
    uint16_t CORE_SPEC_THREAD
    uint8_t JOB_DEF_CPU_PER_GPU
    uint8_t JOB_DEF_MEM_PER_GPU
    uint8_t PART_FLAG_DEFAULT
    uint8_t PART_FLAG_HIDDEN
    uint8_t PART_FLAG_NO_ROOT
    uint8_t PART_FLAG_ROOT_ONLY
    uint8_t PART_FLAG_REQ_RESV
    uint8_t PART_FLAG_LLN
    uint8_t PART_FLAG_EXCLUSIVE_USER
    uint8_t PART_FLAG_PDOI
    uint16_t PART_FLAG_DEFAULT_CLR
    uint16_t PART_FLAG_HIDDEN_CLR
    uint16_t PART_FLAG_NO_ROOT_CLR
    uint16_t PART_FLAG_ROOT_ONLY_CLR
    uint16_t PART_FLAG_REQ_RESV_CLR
    uint16_t PART_FLAG_LLN_CLR
    uint16_t PART_FLAG_EXC_USER_CLR
    uint16_t PART_FLAG_PDOI_CLR
    uint32_t PART_FLAG_EXCLUSIVE_TOPO
    uint32_t PART_FLAG_EXC_TOPO_CLR
    uint32_t PART_FLAG_SCHED_FAILED
    uint32_t PART_FLAG_SCHED_CLEARED
    uint8_t RESERVE_FLAG_MAINT
    uint8_t RESERVE_FLAG_NO_MAINT
    uint8_t RESERVE_FLAG_DAILY
    uint8_t RESERVE_FLAG_NO_DAILY
    uint8_t RESERVE_FLAG_WEEKLY
    uint8_t RESERVE_FLAG_NO_WEEKLY
    uint8_t RESERVE_FLAG_IGN_JOBS
    uint8_t RESERVE_FLAG_NO_IGN_JOB
    uint16_t RESERVE_FLAG_ANY_NODES
    uint16_t RESERVE_FLAG_NO_ANY_NODES
    uint16_t RESERVE_FLAG_STATIC
    uint16_t RESERVE_FLAG_NO_STATIC
    uint16_t RESERVE_FLAG_PART_NODES
    uint16_t RESERVE_FLAG_NO_PART_NODES
    uint16_t RESERVE_FLAG_OVERLAP
    uint16_t RESERVE_FLAG_SPEC_NODES
    uint32_t RESERVE_FLAG_TIME_FLOAT
    uint32_t RESERVE_FLAG_REPLACE
    uint32_t RESERVE_FLAG_ALL_NODES
    uint32_t RESERVE_FLAG_PURGE_COMP
    uint32_t RESERVE_FLAG_WEEKDAY
    uint32_t RESERVE_FLAG_NO_WEEKDAY
    uint32_t RESERVE_FLAG_WEEKEND
    uint32_t RESERVE_FLAG_NO_WEEKEND
    uint32_t RESERVE_FLAG_FLEX
    uint32_t RESERVE_FLAG_NO_FLEX
    uint32_t RESERVE_FLAG_DUR_PLUS
    uint32_t RESERVE_FLAG_DUR_MINUS
    uint32_t RESERVE_FLAG_NO_HOLD_JOBS
    uint32_t RESERVE_FLAG_REPLACE_DOWN
    uint32_t RESERVE_FLAG_NO_PURGE_COMP
    uint64_t RESERVE_FLAG_MAGNETIC
    uint64_t RESERVE_FLAG_NO_MAGNETIC
    uint64_t RESERVE_FLAG_SKIP
    uint64_t RESERVE_FLAG_HOURLY
    uint64_t RESERVE_FLAG_NO_HOURLY
    uint64_t RESERVE_FLAG_GRES_REQ
    uint64_t RESERVE_TRES_PER_NODE
    uint64_t RESERVE_FLAG_USER_DEL
    uint64_t RESERVE_FLAG_NO_USER_DEL
    uint64_t RESERVE_FLAG_SCHED_FAILED
    uint64_t RESERVE_FLAG_FORCE_START
    uint8_t DEBUG_FLAG_SELECT_TYPE
    uint8_t DEBUG_FLAG_STEPS
    uint8_t DEBUG_FLAG_TRIGGERS
    uint8_t DEBUG_FLAG_CPU_BIND
    uint8_t DEBUG_FLAG_NET_RAW
    uint8_t DEBUG_FLAG_NO_CONF_HASH
    uint8_t DEBUG_FLAG_GRES
    uint8_t DEBUG_FLAG_MPI
    uint16_t DEBUG_FLAG_DATA
    uint16_t DEBUG_FLAG_CONMGR
    uint16_t DEBUG_FLAG_NET
    uint16_t DEBUG_FLAG_PRIO
    uint16_t DEBUG_FLAG_BACKFILL
    uint16_t DEBUG_FLAG_GANG
    uint16_t DEBUG_FLAG_RESERVATION
    uint16_t DEBUG_FLAG_AUDIT_TLS
    uint32_t DEBUG_FLAG_SACK
    uint32_t DEBUG_FLAG_SWITCH
    uint32_t DEBUG_FLAG_ENERGY
    uint32_t DEBUG_FLAG_TLS
    uint32_t DEBUG_FLAG_LICENSE
    uint32_t DEBUG_FLAG_PROFILE
    uint32_t DEBUG_FLAG_INTERCONNECT
    uint32_t DEBUG_FLAG_GLOB_SILENCE
    uint32_t DEBUG_FLAG_NAMESPACE
    uint32_t DEBUG_FLAG_AUDIT_RPCS
    uint32_t DEBUG_FLAG_PROTOCOL
    uint32_t DEBUG_FLAG_BACKFILL_MAP
    uint32_t DEBUG_FLAG_TRACE_JOBS
    uint32_t DEBUG_FLAG_ROUTE
    uint32_t DEBUG_FLAG_DB_ASSOC
    uint32_t DEBUG_FLAG_DB_EVENT
    uint64_t DEBUG_FLAG_DB_JOB
    uint64_t DEBUG_FLAG_DB_QOS
    uint64_t DEBUG_FLAG_DB_QUERY
    uint64_t DEBUG_FLAG_DB_RESV
    uint64_t DEBUG_FLAG_DB_RES
    uint64_t DEBUG_FLAG_DB_STEP
    uint64_t DEBUG_FLAG_DB_USAGE
    uint64_t DEBUG_FLAG_DB_WCKEY
    uint64_t DEBUG_FLAG_BURST_BUF
    uint64_t DEBUG_FLAG_CPU_FREQ
    uint64_t DEBUG_FLAG_POWER
    uint64_t DEBUG_FLAG_DB_ARCHIVE
    uint64_t DEBUG_FLAG_DB_TRES
    uint64_t DEBUG_FLAG_JOBCOMP
    uint64_t DEBUG_FLAG_NODE_FEATURES
    uint64_t DEBUG_FLAG_FEDR
    uint64_t DEBUG_FLAG_HETJOB
    uint64_t DEBUG_FLAG_ACCRUE
    uint64_t DEBUG_FLAG_DBD_AGENT
    uint64_t DEBUG_FLAG_AGENT
    uint64_t DEBUG_FLAG_DEPENDENCY
    uint64_t DEBUG_FLAG_JAG
    uint64_t DEBUG_FLAG_CGROUP
    uint64_t DEBUG_FLAG_SCRIPT
    uint64_t DEBUG_FLAG_METRICS
    uint8_t PREEMPT_MODE_OFF
    uint8_t PREEMPT_MODE_SUSPEND
    uint8_t PREEMPT_MODE_REQUEUE
    uint8_t PREEMPT_MODE_CANCEL
    uint8_t PREEMPT_MODE_COND_OFF
    uint16_t PREEMPT_MODE_PRIORITY
    uint16_t PREEMPT_MODE_WITHIN
    uint16_t PREEMPT_MODE_GANG
    uint8_t RECONFIG_KEEP_PART_INFO
    uint8_t RECONFIG_KEEP_PART_STAT
    uint8_t RECONFIG_KEEP_POWER_SAVE_SETTINGS
    uint8_t HEALTH_CHECK_NODE_IDLE
    uint8_t HEALTH_CHECK_NODE_ALLOC
    uint8_t HEALTH_CHECK_NODE_MIXED
    uint8_t HEALTH_CHECK_NODE_NONDRAINED_IDLE
    uint8_t HEALTH_CHECK_NODE_ANY
    uint16_t HEALTH_CHECK_CYCLE
    uint16_t HEALTH_CHECK_START_ONLY
    uint8_t PROLOG_FLAG_ALLOC
    uint8_t PROLOG_FLAG_NOHOLD
    uint8_t PROLOG_FLAG_CONTAIN
    uint8_t PROLOG_FLAG_SERIAL
    uint8_t PROLOG_FLAG_X11
    uint8_t PROLOG_FLAG_DEFER_BATCH
    uint8_t PROLOG_FLAG_FORCE_REQUEUE_ON_FAIL
    uint8_t PROLOG_FLAG_RUN_IN_JOB
    uint8_t CONF_FLAG_OR
    uint8_t CONF_FLAG_SJC
    uint8_t CONF_FLAG_DRJ
    uint8_t CONF_FLAG_ASRU
    uint8_t CONF_FLAG_PAM
    uint8_t CONF_FLAG_WCKEY
    uint8_t CONF_FLAG_IPV4_ENABLED
    uint8_t CONF_FLAG_IPV6_ENABLED
    uint16_t CONF_FLAG_SJX
    uint16_t CONF_FLAG_SJS
    uint16_t CONF_FLAG_SJE
    uint16_t CONF_FLAG_L3CSOCK
    uint16_t CONF_FLAG_NNSOCK
    uint16_t CONF_FLAG_ECORE
    uint16_t CONF_FLAG_SHR
    uint16_t CONF_FLAG_CONTAIN_SPANK
    uint32_t CONF_FLAG_NO_STDIO
    uint32_t CONF_FLAG_DISABLE_HTTP
    uint8_t LOG_FMT_ISO8601_MS
    uint8_t LOG_FMT_ISO8601
    uint8_t LOG_FMT_RFC5424_MS
    uint8_t LOG_FMT_RFC5424
    uint8_t LOG_FMT_CLOCK
    uint8_t LOG_FMT_SHORT
    uint8_t LOG_FMT_THREAD_ID
    uint8_t LOG_FMT_RFC3339
    uint8_t STAT_COMMAND_RESET
    uint8_t STAT_COMMAND_GET
    uint8_t TRIGGER_FLAG_PERM
    uint8_t TRIGGER_RES_TYPE_JOB
    uint8_t TRIGGER_RES_TYPE_NODE
    uint8_t TRIGGER_RES_TYPE_SLURMCTLD
    uint8_t TRIGGER_RES_TYPE_SLURMDBD
    uint8_t TRIGGER_RES_TYPE_DATABASE
    uint8_t TRIGGER_RES_TYPE_OTHER
    uint8_t TRIGGER_TYPE_UP
    uint8_t TRIGGER_TYPE_DOWN
    uint8_t TRIGGER_TYPE_FAIL
    uint8_t TRIGGER_TYPE_TIME
    uint8_t TRIGGER_TYPE_FINI
    uint8_t TRIGGER_TYPE_RECONFIG
    uint8_t TRIGGER_TYPE_IDLE
    uint16_t TRIGGER_TYPE_DRAINED
    uint16_t TRIGGER_TYPE_PRI_CTLD_FAIL
    uint16_t TRIGGER_TYPE_PRI_CTLD_RES_OP
    uint16_t TRIGGER_TYPE_PRI_CTLD_RES_CTRL
    uint16_t TRIGGER_TYPE_PRI_CTLD_ACCT_FULL
    uint16_t TRIGGER_TYPE_BU_CTLD_FAIL
    uint16_t TRIGGER_TYPE_BU_CTLD_RES_OP
    uint16_t TRIGGER_TYPE_BU_CTLD_AS_CTRL
    uint32_t TRIGGER_TYPE_PRI_DBD_FAIL
    uint32_t TRIGGER_TYPE_PRI_DBD_RES_OP
    uint32_t TRIGGER_TYPE_PRI_DB_FAIL
    uint32_t TRIGGER_TYPE_PRI_DB_RES_OP
    uint32_t TRIGGER_TYPE_BURST_BUFFER
    uint32_t TRIGGER_TYPE_DRAINING
    uint32_t TRIGGER_TYPE_RESUME
    uint8_t ASSOC_MGR_INFO_FLAG_ASSOC
    uint8_t ASSOC_MGR_INFO_FLAG_USERS
    uint8_t ASSOC_MGR_INFO_FLAG_QOS
    uint8_t KILL_JOB_BATCH
    uint8_t KILL_ARRAY_TASK
    uint8_t KILL_STEPS_ONLY
    uint8_t KILL_FULL_JOB
    uint8_t KILL_FED_REQUEUE
    uint8_t KILL_HURRY
    uint8_t KILL_OOM
    uint8_t KILL_NO_SIBS
    uint16_t KILL_JOB_RESV
    uint16_t KILL_NO_SIG_FAIL
    uint16_t KILL_JOBS_VERBOSE
    uint16_t KILL_CRON
    uint16_t KILL_FAIL_JOB
    uint16_t WARN_SENT
    uint8_t BB_FLAG_DISABLE_PERSISTENT
    uint8_t BB_FLAG_ENABLE_PERSISTENT
    uint8_t BB_FLAG_EMULATE_CRAY
    uint8_t BB_FLAG_PRIVATE_DATA
    uint8_t BB_FLAG_TEARDOWN_FAILURE
    uint64_t BB_SIZE_IN_NODES
    uint8_t BB_STATE_PENDING
    uint8_t BB_STATE_ALLOCATING
    uint8_t BB_STATE_ALLOCATED
    uint8_t BB_STATE_DELETING
    uint8_t BB_STATE_DELETED
    uint8_t BB_STATE_STAGING_IN
    uint8_t BB_STATE_STAGED_IN
    uint8_t BB_STATE_PRE_RUN
    uint8_t BB_STATE_ALLOC_REVOKE
    uint8_t BB_STATE_RUNNING
    uint8_t BB_STATE_SUSPEND
    uint8_t BB_STATE_POST_RUN
    uint8_t BB_STATE_STAGING_OUT
    uint8_t BB_STATE_STAGED_OUT
    uint8_t BB_STATE_TEARDOWN
    uint8_t BB_STATE_TEARDOWN_FAIL
    uint8_t BB_STATE_COMPLETE

cdef extern from "slurm/slurm.h":

    ctypedef uint64_t sluid_t

    ctypedef sockaddr_storage slurm_addr_t

    ctypedef slurmdb_cluster_rec slurmdb_cluster_rec_t

    ctypedef job_resources job_resources_t

    ctypedef jobacctinfo jobacctinfo_t

    ctypedef allocation_msg_thread allocation_msg_thread_t

    ctypedef sbcast_cred sbcast_cred_t

    ctypedef struct slurm_hash_t:
        unsigned char type
        unsigned char hash[32]

    ctypedef struct slurm_step_id_t:
        sluid_t sluid
        uint32_t job_id
        uint32_t step_het_comp
        uint32_t step_id

    cdef enum job_states:
        JOB_PENDING
        JOB_RUNNING
        JOB_SUSPENDED
        JOB_COMPLETE
        JOB_CANCELLED
        JOB_FAILED
        JOB_TIMEOUT
        JOB_NODE_FAIL
        JOB_PREEMPTED
        JOB_BOOT_FAIL
        JOB_DEADLINE
        JOB_OOM
        JOB_END

    cdef enum job_state_reason:
        WAIT_NO_REASON
        WAIT_PRIORITY
        WAIT_DEPENDENCY
        WAIT_RESOURCES
        WAIT_PART_NODE_LIMIT
        WAIT_PART_TIME_LIMIT
        WAIT_PART_DOWN
        WAIT_PART_INACTIVE
        WAIT_HELD
        WAIT_TIME
        WAIT_LICENSES
        WAIT_ASSOC_JOB_LIMIT
        WAIT_ASSOC_RESOURCE_LIMIT
        WAIT_ASSOC_TIME_LIMIT
        WAIT_RESERVATION
        WAIT_NODE_NOT_AVAIL
        WAIT_HELD_USER
        WAIT_NVIDIA_IMEX_CHANNELS
        FAIL_DEFER
        FAIL_DOWN_PARTITION
        FAIL_DOWN_NODE
        FAIL_BAD_CONSTRAINTS
        FAIL_SYSTEM
        FAIL_LAUNCH
        FAIL_EXIT_CODE
        FAIL_TIMEOUT
        FAIL_INACTIVE_LIMIT
        FAIL_ACCOUNT
        FAIL_QOS
        WAIT_QOS_THRES
        WAIT_QOS_JOB_LIMIT
        WAIT_QOS_RESOURCE_LIMIT
        WAIT_QOS_TIME_LIMIT
        FAIL_SIGNAL
        DEFUNCT_WAIT_34
        WAIT_CLEANING
        WAIT_PROLOG
        WAIT_QOS
        WAIT_ACCOUNT
        WAIT_DEP_INVALID
        WAIT_QOS_GRP_CPU
        WAIT_QOS_GRP_CPU_MIN
        WAIT_QOS_GRP_CPU_RUN_MIN
        WAIT_QOS_GRP_JOB
        WAIT_QOS_GRP_MEM
        WAIT_QOS_GRP_NODE
        WAIT_QOS_GRP_SUB_JOB
        WAIT_QOS_GRP_WALL
        WAIT_QOS_MAX_CPU_PER_JOB
        WAIT_QOS_MAX_CPU_MINS_PER_JOB
        WAIT_QOS_MAX_NODE_PER_JOB
        WAIT_QOS_MAX_WALL_PER_JOB
        WAIT_QOS_MAX_CPU_PER_USER
        WAIT_QOS_MAX_JOB_PER_USER
        WAIT_QOS_MAX_NODE_PER_USER
        WAIT_QOS_MAX_SUB_JOB
        WAIT_QOS_MIN_CPU
        WAIT_ASSOC_GRP_CPU
        WAIT_ASSOC_GRP_CPU_MIN
        WAIT_ASSOC_GRP_CPU_RUN_MIN
        WAIT_ASSOC_GRP_JOB
        WAIT_ASSOC_GRP_MEM
        WAIT_ASSOC_GRP_NODE
        WAIT_ASSOC_GRP_SUB_JOB
        WAIT_ASSOC_GRP_WALL
        WAIT_ASSOC_MAX_JOBS
        WAIT_ASSOC_MAX_CPU_PER_JOB
        WAIT_ASSOC_MAX_CPU_MINS_PER_JOB
        WAIT_ASSOC_MAX_NODE_PER_JOB
        WAIT_ASSOC_MAX_WALL_PER_JOB
        WAIT_ASSOC_MAX_SUB_JOB
        WAIT_MAX_REQUEUE
        WAIT_ARRAY_TASK_LIMIT
        WAIT_BURST_BUFFER_RESOURCE
        WAIT_BURST_BUFFER_STAGING
        FAIL_BURST_BUFFER_OP
        DEFUNCT_WAIT_76
        DEFUNCT_WAIT_77
        WAIT_ASSOC_GRP_UNK
        WAIT_ASSOC_GRP_UNK_MIN
        WAIT_ASSOC_GRP_UNK_RUN_MIN
        WAIT_ASSOC_MAX_UNK_PER_JOB
        WAIT_ASSOC_MAX_UNK_PER_NODE
        WAIT_ASSOC_MAX_UNK_MINS_PER_JOB
        WAIT_ASSOC_MAX_CPU_PER_NODE
        WAIT_ASSOC_GRP_MEM_MIN
        WAIT_ASSOC_GRP_MEM_RUN_MIN
        WAIT_ASSOC_MAX_MEM_PER_JOB
        WAIT_ASSOC_MAX_MEM_PER_NODE
        WAIT_ASSOC_MAX_MEM_MINS_PER_JOB
        WAIT_ASSOC_GRP_NODE_MIN
        WAIT_ASSOC_GRP_NODE_RUN_MIN
        WAIT_ASSOC_MAX_NODE_MINS_PER_JOB
        WAIT_ASSOC_GRP_ENERGY
        WAIT_ASSOC_GRP_ENERGY_MIN
        WAIT_ASSOC_GRP_ENERGY_RUN_MIN
        WAIT_ASSOC_MAX_ENERGY_PER_JOB
        WAIT_ASSOC_MAX_ENERGY_PER_NODE
        WAIT_ASSOC_MAX_ENERGY_MINS_PER_JOB
        WAIT_ASSOC_GRP_GRES
        WAIT_ASSOC_GRP_GRES_MIN
        WAIT_ASSOC_GRP_GRES_RUN_MIN
        WAIT_ASSOC_MAX_GRES_PER_JOB
        WAIT_ASSOC_MAX_GRES_PER_NODE
        WAIT_ASSOC_MAX_GRES_MINS_PER_JOB
        WAIT_ASSOC_GRP_LIC
        WAIT_ASSOC_GRP_LIC_MIN
        WAIT_ASSOC_GRP_LIC_RUN_MIN
        WAIT_ASSOC_MAX_LIC_PER_JOB
        WAIT_ASSOC_MAX_LIC_MINS_PER_JOB
        WAIT_ASSOC_GRP_BB
        WAIT_ASSOC_GRP_BB_MIN
        WAIT_ASSOC_GRP_BB_RUN_MIN
        WAIT_ASSOC_MAX_BB_PER_JOB
        WAIT_ASSOC_MAX_BB_PER_NODE
        WAIT_ASSOC_MAX_BB_MINS_PER_JOB
        WAIT_QOS_GRP_UNK
        WAIT_QOS_GRP_UNK_MIN
        WAIT_QOS_GRP_UNK_RUN_MIN
        WAIT_QOS_MAX_UNK_PER_JOB
        WAIT_QOS_MAX_UNK_PER_NODE
        WAIT_QOS_MAX_UNK_PER_USER
        WAIT_QOS_MAX_UNK_MINS_PER_JOB
        WAIT_QOS_MIN_UNK
        WAIT_QOS_MAX_CPU_PER_NODE
        WAIT_QOS_GRP_MEM_MIN
        WAIT_QOS_GRP_MEM_RUN_MIN
        WAIT_QOS_MAX_MEM_MINS_PER_JOB
        WAIT_QOS_MAX_MEM_PER_JOB
        WAIT_QOS_MAX_MEM_PER_NODE
        WAIT_QOS_MAX_MEM_PER_USER
        WAIT_QOS_MIN_MEM
        WAIT_QOS_GRP_ENERGY
        WAIT_QOS_GRP_ENERGY_MIN
        WAIT_QOS_GRP_ENERGY_RUN_MIN
        WAIT_QOS_MAX_ENERGY_PER_JOB
        WAIT_QOS_MAX_ENERGY_PER_NODE
        WAIT_QOS_MAX_ENERGY_PER_USER
        WAIT_QOS_MAX_ENERGY_MINS_PER_JOB
        WAIT_QOS_MIN_ENERGY
        WAIT_QOS_GRP_NODE_MIN
        WAIT_QOS_GRP_NODE_RUN_MIN
        WAIT_QOS_MAX_NODE_MINS_PER_JOB
        WAIT_QOS_MIN_NODE
        WAIT_QOS_GRP_GRES
        WAIT_QOS_GRP_GRES_MIN
        WAIT_QOS_GRP_GRES_RUN_MIN
        WAIT_QOS_MAX_GRES_PER_JOB
        WAIT_QOS_MAX_GRES_PER_NODE
        WAIT_QOS_MAX_GRES_PER_USER
        WAIT_QOS_MAX_GRES_MINS_PER_JOB
        WAIT_QOS_MIN_GRES
        WAIT_QOS_GRP_LIC
        WAIT_QOS_GRP_LIC_MIN
        WAIT_QOS_GRP_LIC_RUN_MIN
        WAIT_QOS_MAX_LIC_PER_JOB
        WAIT_QOS_MAX_LIC_PER_USER
        WAIT_QOS_MAX_LIC_MINS_PER_JOB
        WAIT_QOS_MIN_LIC
        WAIT_QOS_GRP_BB
        WAIT_QOS_GRP_BB_MIN
        WAIT_QOS_GRP_BB_RUN_MIN
        WAIT_QOS_MAX_BB_PER_JOB
        WAIT_QOS_MAX_BB_PER_NODE
        WAIT_QOS_MAX_BB_PER_USER
        WAIT_QOS_MAX_BB_MINS_PER_JOB
        WAIT_QOS_MIN_BB
        FAIL_DEADLINE
        WAIT_QOS_MAX_BB_PER_ACCT
        WAIT_QOS_MAX_CPU_PER_ACCT
        WAIT_QOS_MAX_ENERGY_PER_ACCT
        WAIT_QOS_MAX_GRES_PER_ACCT
        WAIT_QOS_MAX_NODE_PER_ACCT
        WAIT_QOS_MAX_LIC_PER_ACCT
        WAIT_QOS_MAX_MEM_PER_ACCT
        WAIT_QOS_MAX_UNK_PER_ACCT
        WAIT_QOS_MAX_JOB_PER_ACCT
        WAIT_QOS_MAX_SUB_JOB_PER_ACCT
        WAIT_PART_CONFIG
        WAIT_ACCOUNT_POLICY
        WAIT_FED_JOB_LOCK
        FAIL_OOM
        WAIT_PN_MEM_LIMIT
        WAIT_ASSOC_GRP_BILLING
        WAIT_ASSOC_GRP_BILLING_MIN
        WAIT_ASSOC_GRP_BILLING_RUN_MIN
        WAIT_ASSOC_MAX_BILLING_PER_JOB
        WAIT_ASSOC_MAX_BILLING_PER_NODE
        WAIT_ASSOC_MAX_BILLING_MINS_PER_JOB
        WAIT_QOS_GRP_BILLING
        WAIT_QOS_GRP_BILLING_MIN
        WAIT_QOS_GRP_BILLING_RUN_MIN
        WAIT_QOS_MAX_BILLING_PER_JOB
        WAIT_QOS_MAX_BILLING_PER_NODE
        WAIT_QOS_MAX_BILLING_PER_USER
        WAIT_QOS_MAX_BILLING_MINS_PER_JOB
        WAIT_QOS_MAX_BILLING_PER_ACCT
        WAIT_QOS_MIN_BILLING
        WAIT_RESV_DELETED
        WAIT_RESV_INVALID
        FAIL_CONSTRAINTS
        WAIT_QOS_MAX_BB_RUN_MINS_PER_ACCT
        WAIT_QOS_MAX_BILLING_RUN_MINS_PER_ACCT
        WAIT_QOS_MAX_CPU_RUN_MINS_PER_ACCT
        WAIT_QOS_MAX_ENERGY_RUN_MINS_PER_ACCT
        WAIT_QOS_MAX_GRES_RUN_MINS_PER_ACCT
        WAIT_QOS_MAX_NODE_RUN_MINS_PER_ACCT
        WAIT_QOS_MAX_LIC_RUN_MINS_PER_ACCT
        WAIT_QOS_MAX_MEM_RUN_MINS_PER_ACCT
        WAIT_QOS_MAX_UNK_RUN_MINS_PER_ACCT
        WAIT_QOS_MAX_BB_RUN_MINS_PER_USER
        WAIT_QOS_MAX_BILLING_RUN_MINS_PER_USER
        WAIT_QOS_MAX_CPU_RUN_MINS_PER_USER
        WAIT_QOS_MAX_ENERGY_RUN_MINS_PER_USER
        WAIT_QOS_MAX_GRES_RUN_MINS_PER_USER
        WAIT_QOS_MAX_NODE_RUN_MINS_PER_USER
        WAIT_QOS_MAX_LIC_RUN_MINS_PER_USER
        WAIT_QOS_MAX_MEM_RUN_MINS_PER_USER
        WAIT_QOS_MAX_UNK_RUN_MINS_PER_USER
        WAIT_MAX_POWERED_NODES
        WAIT_MPI_PORTS_BUSY
        REASON_END

    cdef enum job_acct_types:
        JOB_START
        JOB_STEP
        JOB_SUSPEND
        JOB_TERMINATED

    cdef enum auth_plugin_type:
        AUTH_PLUGIN_NONE
        AUTH_PLUGIN_MUNGE
        AUTH_PLUGIN_JWT
        AUTH_PLUGIN_SLURM

    cdef enum hash_plugin_type:
        HASH_PLUGIN_DEFAULT
        HASH_PLUGIN_NONE
        HASH_PLUGIN_K12
        HASH_PLUGIN_SHA256
        HASH_PLUGIN_SHA3
        HASH_PLUGIN_CNT

    cdef enum tls_plugin_type:
        TLS_PLUGIN_NONE
        TLS_PLUGIN_S2N

    cdef enum select_plugin_type:
        SELECT_PLUGIN_LINEAR
        SELECT_PLUGIN_CONS_TRES

    cdef enum switch_plugin_type:
        SWITCH_PLUGIN_NONE
        SWITCH_PLUGIN_GENERIC
        SWITCH_PLUGIN_CRAY
        SWITCH_PLUGIN_SLINGSHOT
        SWITCH_PLUGIN_NVIDIA_IMEX

    cdef enum select_print_mode:
        SELECT_PRINT_HEAD
        SELECT_PRINT_DATA
        SELECT_PRINT_MIXED
        SELECT_PRINT_MIXED_SHORT
        SELECT_PRINT_BG_ID
        SELECT_PRINT_NODES
        SELECT_PRINT_CONNECTION
        SELECT_PRINT_ROTATE
        SELECT_PRINT_GEOMETRY
        SELECT_PRINT_START
        SELECT_PRINT_BLRTS_IMAGE
        SELECT_PRINT_LINUX_IMAGE
        SELECT_PRINT_MLOADER_IMAGE
        SELECT_PRINT_RAMDISK_IMAGE
        SELECT_PRINT_REBOOT
        SELECT_PRINT_RESV_ID
        SELECT_PRINT_START_LOC

    cdef enum select_node_cnt:
        SELECT_GET_NODE_SCALING
        SELECT_GET_NODE_CPU_CNT
        SELECT_GET_MP_CPU_CNT
        SELECT_APPLY_NODE_MIN_OFFSET
        SELECT_APPLY_NODE_MAX_OFFSET
        SELECT_SET_NODE_CNT
        SELECT_SET_MP_CNT

    cdef enum acct_gather_profile_info:
        ACCT_GATHER_PROFILE_DIR
        ACCT_GATHER_PROFILE_DEFAULT
        ACCT_GATHER_PROFILE_RUNNING

    cdef enum jobacct_data_type:
        JOBACCT_DATA_TOTAL
        JOBACCT_DATA_PIPE
        JOBACCT_DATA_RUSAGE
        JOBACCT_DATA_TOT_VSIZE
        JOBACCT_DATA_TOT_RSS

    cdef enum acct_energy_type:
        ENERGY_DATA_JOULES_TASK
        ENERGY_DATA_STRUCT
        ENERGY_DATA_RECONFIG
        ENERGY_DATA_PROFILE
        ENERGY_DATA_LAST_POLL
        ENERGY_DATA_SENSOR_CNT
        ENERGY_DATA_NODE_ENERGY
        ENERGY_DATA_NODE_ENERGY_UP
        ENERGY_DATA_STEP_PTR

    ctypedef enum update_mode_t:
        UPDATE_SET
        UPDATE_ADD
        UPDATE_REMOVE

    cdef enum task_dist_states:
        SLURM_DIST_CYCLIC
        SLURM_DIST_BLOCK
        SLURM_DIST_ARBITRARY
        SLURM_DIST_PLANE
        SLURM_DIST_CYCLIC_CYCLIC
        SLURM_DIST_CYCLIC_BLOCK
        SLURM_DIST_CYCLIC_CFULL
        SLURM_DIST_BLOCK_CYCLIC
        SLURM_DIST_BLOCK_BLOCK
        SLURM_DIST_BLOCK_CFULL
        SLURM_DIST_CYCLIC_CYCLIC_CYCLIC
        SLURM_DIST_CYCLIC_CYCLIC_BLOCK
        SLURM_DIST_CYCLIC_CYCLIC_CFULL
        SLURM_DIST_CYCLIC_BLOCK_CYCLIC
        SLURM_DIST_CYCLIC_BLOCK_BLOCK
        SLURM_DIST_CYCLIC_BLOCK_CFULL
        SLURM_DIST_CYCLIC_CFULL_CYCLIC
        SLURM_DIST_CYCLIC_CFULL_BLOCK
        SLURM_DIST_CYCLIC_CFULL_CFULL
        SLURM_DIST_BLOCK_CYCLIC_CYCLIC
        SLURM_DIST_BLOCK_CYCLIC_BLOCK
        SLURM_DIST_BLOCK_CYCLIC_CFULL
        SLURM_DIST_BLOCK_BLOCK_CYCLIC
        SLURM_DIST_BLOCK_BLOCK_BLOCK
        SLURM_DIST_BLOCK_BLOCK_CFULL
        SLURM_DIST_BLOCK_CFULL_CYCLIC
        SLURM_DIST_BLOCK_CFULL_BLOCK
        SLURM_DIST_BLOCK_CFULL_CFULL
        SLURM_DIST_NODECYCLIC
        SLURM_DIST_NODEBLOCK
        SLURM_DIST_SOCKCYCLIC
        SLURM_DIST_SOCKBLOCK
        SLURM_DIST_SOCKCFULL
        SLURM_DIST_CORECYCLIC
        SLURM_DIST_COREBLOCK
        SLURM_DIST_CORECFULL
        SLURM_DIST_UNKNOWN

    ctypedef task_dist_states task_dist_states_t

    cdef enum cpu_bind_type:
        CPU_BIND_VERBOSE
        CPU_BIND_TO_THREADS
        CPU_BIND_TO_CORES
        CPU_BIND_TO_SOCKETS
        CPU_BIND_TO_LDOMS
        CPU_BIND_NONE
        CPU_BIND_MAP
        CPU_BIND_MASK
        CPU_BIND_LDRANK
        CPU_BIND_LDMAP
        CPU_BIND_LDMASK
        CPU_BIND_ONE_THREAD_PER_CORE
        CPU_AUTO_BIND_TO_THREADS
        CPU_AUTO_BIND_TO_CORES
        CPU_AUTO_BIND_TO_SOCKETS
        SLURMD_OFF_SPEC
        CPU_BIND_OFF
        OOM_KILL_STEP
        SLURMD_SPEC_OVERRIDE

    ctypedef cpu_bind_type cpu_bind_type_t

    cdef enum mem_bind_type:
        MEM_BIND_VERBOSE
        MEM_BIND_NONE
        MEM_BIND_RANK
        MEM_BIND_MAP
        MEM_BIND_MASK
        MEM_BIND_LOCAL
        MEM_BIND_SORT
        MEM_BIND_PREFER

    ctypedef mem_bind_type mem_bind_type_t

    cdef enum accel_bind_type:
        ACCEL_BIND_VERBOSE
        ACCEL_BIND_CLOSEST_GPU
        ACCEL_BIND_CLOSEST_NIC

    ctypedef accel_bind_type accel_bind_type_t

    cdef enum node_states:
        NODE_STATE_UNKNOWN
        NODE_STATE_DOWN
        NODE_STATE_IDLE
        NODE_STATE_ALLOCATED
        NODE_STATE_ERROR
        NODE_STATE_MIXED
        NODE_STATE_FUTURE
        NODE_STATE_END

    ctypedef enum select_type_flags_t:
        SELECT_CPU
        SELECT_SOCKET
        SELECT_CORE
        SELECT_BOARD
        SELECT_MEMORY
        SELECT_LINEAR
        SELECT_ENFORCE_BINDING_GRES
        SELECT_ONE_TASK_PER_SHARING_GRES
        SELECT_ONE_TASK_PER_CORE
        SELECT_PACK_NODES
        SELECT_LL_SHARED_GRES
        SELECT_CORE_DEFAULT_DIST_BLOCK
        SELECT_LLN
        SELECT_MULTIPLE_SHARING_GRES_PJ

    ctypedef enum step_spec_flags_t:
        SSF_NONE
        SSF_EXCLUSIVE
        SSF_NO_KILL
        SSF_OVERCOMMIT
        SSF_WHOLE
        SSF_INTERACTIVE
        SSF_MEM_ZERO
        SSF_OVERLAP_FORCE
        SSF_NO_SIG_FAIL
        SSF_EXT_LAUNCHER
        SSF_GRES_ALLOW_TASK_SHARING
        SSF_WAIT_FOR_CHILDREN
        SSF_KILL_ON_BAD_EXIT

    cdef enum topology_plugin_type:
        TOPOLOGY_PLUGIN_FLAT
        TOPOLOGY_PLUGIN_3DTORUS
        TOPOLOGY_PLUGIN_TREE
        TOPOLOGY_PLUGIN_BLOCK

    void slurm_init(const char* conf)

    void slurm_fini()

    ctypedef hostlist hostlist_t

    hostlist_t* slurm_hostlist_create(const char* hostlist)

    int slurm_hostlist_count(hostlist_t* hl)

    void slurm_hostlist_destroy(hostlist_t* hl)

    int slurm_hostlist_find(hostlist_t* hl, const char* hostname)

    int slurm_hostlist_push(hostlist_t* hl, const char* hosts)

    int slurm_hostlist_push_host(hostlist_t* hl, const char* host)

    ssize_t slurm_hostlist_ranged_string(hostlist_t* hl, size_t n, char* buf)

    char* slurm_hostlist_ranged_string_xmalloc(hostlist_t* hl)

    char* slurm_hostlist_shift(hostlist_t* hl)

    void slurm_hostlist_uniq(hostlist_t* hl)

    ctypedef xlist list_t

    ctypedef listIterator list_itr_t

    ctypedef void (*ListDelF)(void* x)

    ctypedef int (*ListCmpF)(void* x, void* y)

    ctypedef int (*ListFindF)(void* x, void* key)

    ctypedef int (*ListForF)(void* x, void* arg)

    void slurm_list_append(list_t* l, void* x)

    int slurm_list_count(list_t* l)

    list_t* slurm_list_create(ListDelF f)

    void slurm_list_destroy(list_t* l)

    void* slurm_list_find(list_itr_t* i, ListFindF f, void* key)

    int slurm_list_is_empty(list_t* l)

    list_itr_t* slurm_list_iterator_create(list_t* l)

    void slurm_list_iterator_reset(list_itr_t* i)

    void slurm_list_iterator_destroy(list_itr_t* i)

    void* slurm_list_next(list_itr_t* i)

    void slurm_list_sort(list_t* l, ListCmpF f)

    void* slurm_list_pop(list_t* l)

    ctypedef int64_t bitstr_t

    ctypedef bitstr_t bitoff_t

    cdef struct acct_gather_energy:
        uint32_t ave_watts
        uint64_t base_consumed_energy
        uint64_t consumed_energy
        uint32_t current_watts
        uint64_t last_adjustment
        uint64_t previous_consumed_energy
        time_t poll_time
        time_t slurmd_start_time

    ctypedef acct_gather_energy acct_gather_energy_t

    ctypedef struct slurm_node_alias_addrs_t:
        time_t expiration
        char* net_cred
        slurm_addr_t* node_addrs
        uint32_t node_cnt
        char* node_list

    cdef struct job_descriptor:
        char* account
        char* acctg_freq
        char* admin_comment
        char* alloc_node
        uint16_t alloc_resp_port
        char* alloc_tls_cert
        uint32_t alloc_sid
        uint32_t argc
        char** argv
        char* array_inx
        bitstr_t* array_bitmap
        char* batch_features
        time_t begin_time
        uint64_t bitflags
        char* burst_buffer
        char* clusters
        char* cluster_features
        char* comment
        uint16_t contiguous
        char* container
        char* container_id
        uint16_t core_spec
        char* cpu_bind
        uint16_t cpu_bind_type
        uint32_t cpu_freq_min
        uint32_t cpu_freq_max
        uint32_t cpu_freq_gov
        char* cpus_per_tres
        void* crontab_entry
        time_t deadline
        uint32_t delay_boot
        char* dependency
        time_t end_time
        char** environment
        slurm_hash_t env_hash
        uint32_t env_size
        char* exc_nodes
        char* extra
        char* features
        uint64_t fed_siblings_active
        uint64_t fed_siblings_viable
        uint32_t group_id
        uint32_t het_job_offset
        void* id
        uint16_t immediate
        char* job_id_str
        char* job_size_str
        uint16_t kill_on_node_fail
        char* licenses
        char* licenses_tot
        uint16_t mail_type
        char* mail_user
        char* mcs_label
        char* mem_bind
        uint16_t mem_bind_type
        char* mem_per_tres
        char* name
        char* network
        uint32_t nice
        uint32_t num_tasks
        uint16_t oom_kill_step
        uint8_t open_mode
        char* origin_cluster
        uint16_t other_port
        uint8_t overcommit
        char* partition
        uint16_t plane_size
        char* prefer
        uint32_t priority
        uint32_t profile
        char* qos
        uint16_t reboot
        char* resp_host
        uint16_t restart_cnt
        char* req_nodes
        uint16_t requeue
        char* reservation
        uint16_t resv_port_cnt
        char* script
        void* script_buf
        slurm_hash_t script_hash
        uint16_t shared
        uint32_t site_factor
        char** spank_job_env
        uint32_t spank_job_env_size
        slurm_step_id_t step_id
        char* submit_line
        uint32_t task_dist
        uint32_t time_limit
        uint32_t time_min
        char* tres_bind
        char* tres_freq
        char* tres_per_job
        char* tres_per_node
        char* tres_per_socket
        char* tres_per_task
        uint32_t user_id
        uint16_t wait_all_nodes
        uint16_t warn_flags
        uint16_t warn_signal
        uint16_t warn_time
        char* work_dir
        uint16_t cpus_per_task
        uint32_t min_cpus
        uint32_t max_cpus
        uint32_t min_nodes
        uint32_t max_nodes
        uint16_t boards_per_node
        uint16_t sockets_per_board
        uint16_t sockets_per_node
        uint16_t cores_per_socket
        uint16_t threads_per_core
        uint16_t ntasks_per_node
        uint16_t ntasks_per_socket
        uint16_t ntasks_per_core
        uint16_t ntasks_per_board
        uint16_t ntasks_per_tres
        uint16_t pn_min_cpus
        uint64_t pn_min_memory
        uint32_t pn_min_tmp_disk
        char* req_context
        uint32_t req_switch
        uint16_t segment_size
        char* selinux_context
        char* std_err
        char* std_in
        char* std_out
        uint64_t* tres_req_cnt
        uint32_t wait4switch
        char* wckey
        uint16_t x11
        char* x11_magic_cookie
        char* x11_target
        uint16_t x11_target_port

    ctypedef job_descriptor job_desc_msg_t

    cdef struct job_info:
        char* account
        time_t accrue_time
        char* admin_comment
        char* alloc_node
        uint32_t alloc_sid
        bitstr_t* array_bitmap
        uint32_t array_job_id
        uint32_t array_task_id
        uint32_t array_max_tasks
        char* array_task_str
        uint32_t assoc_id
        char* batch_features
        uint16_t batch_flag
        char* batch_host
        uint64_t bitflags
        uint16_t boards_per_node
        char* burst_buffer
        char* burst_buffer_state
        char* cluster
        char* cluster_features
        char* command
        char* comment
        char* container
        char* container_id
        uint16_t contiguous
        uint16_t core_spec
        uint16_t cores_per_socket
        double billable_tres
        uint16_t cpus_per_task
        uint32_t cpu_freq_min
        uint32_t cpu_freq_max
        uint32_t cpu_freq_gov
        char* cpus_per_tres
        char* cronspec
        time_t deadline
        uint32_t delay_boot
        char* dependency
        uint32_t derived_ec
        time_t eligible_time
        time_t end_time
        char* exc_nodes
        int32_t* exc_node_inx
        uint32_t exit_code
        char* extra
        char* failed_node
        char* features
        char* fed_origin_str
        uint64_t fed_siblings_active
        char* fed_siblings_active_str
        uint64_t fed_siblings_viable
        char* fed_siblings_viable_str
        uint32_t gres_detail_cnt
        char** gres_detail_str
        char* gres_total
        uint32_t group_id
        uint32_t het_job_id
        char* het_job_id_set
        uint32_t het_job_offset
        job_resources_t* job_resrcs
        char* job_size_str
        uint32_t job_state
        time_t last_sched_eval
        char* licenses
        char* licenses_allocated
        uint16_t mail_type
        char* mail_user
        uint32_t max_cpus
        uint32_t max_nodes
        char* mcs_label
        char* mem_per_tres
        char* name
        char* network
        char* nodes
        uint32_t nice
        int32_t* node_inx
        uint16_t ntasks_per_core
        uint16_t ntasks_per_tres
        uint16_t ntasks_per_node
        uint16_t ntasks_per_socket
        uint16_t ntasks_per_board
        uint32_t num_cpus
        uint32_t num_nodes
        uint32_t num_tasks
        uint16_t oom_kill_step
        char* partition
        char* prefer
        uint64_t pn_min_memory
        uint16_t pn_min_cpus
        uint32_t pn_min_tmp_disk
        time_t preempt_time
        time_t preemptable_time
        time_t pre_sus_time
        uint32_t priority
        uint32_t* priority_array
        char* priority_array_names
        uint32_t profile
        char* qos
        uint8_t reboot
        char* req_nodes
        int32_t* req_node_inx
        uint32_t req_switch
        uint16_t requeue
        time_t resize_time
        uint16_t restart_cnt
        char* resv_name
        char* resv_ports
        char* sched_nodes
        char* selinux_context
        uint16_t shared
        uint32_t site_factor
        slurm_step_id_t step_id
        uint16_t sockets_per_board
        uint16_t sockets_per_node
        time_t start_time
        uint16_t start_protocol_ver
        char* state_desc
        uint32_t state_reason
        char* std_err
        char* std_in
        char* std_out
        uint16_t segment_size
        char* submit_line
        time_t submit_time
        time_t suspend_time
        char* system_comment
        uint32_t time_limit
        uint32_t time_min
        uint16_t threads_per_core
        char* tres_bind
        char* tres_freq
        char* tres_per_job
        char* tres_per_node
        char* tres_per_socket
        char* tres_per_task
        char* tres_req_str
        char* tres_alloc_str
        uint32_t user_id
        char* user_name
        uint32_t wait4switch
        char* wckey
        char* work_dir
        uint32_t job_id

    ctypedef job_info slurm_job_info_t

    ctypedef slurm_job_info_t job_info_t

    ctypedef struct priority_factors_t:
        uint32_t nice
        double priority_age
        double priority_assoc
        double priority_fs
        double priority_js
        double priority_part
        double priority_qos
        uint32_t priority_site
        double* priority_tres
        uint32_t tres_cnt
        char** tres_names
        double* tres_weights

    cdef struct priority_factors_object:
        char* account
        char* cluster_name
        double direct_prio
        uint32_t job_id
        char* partition
        priority_factors_t* prio_factors
        char* qos
        uint32_t user_id

    ctypedef priority_factors_object priority_factors_object_t

    cdef struct priority_factors_response_msg:
        list_t* priority_factors_list

    ctypedef priority_factors_response_msg priority_factors_response_msg_t

    cdef struct job_info_msg:
        time_t last_backfill
        time_t last_update
        uint32_t record_count
        slurm_job_info_t* job_array

    ctypedef job_info_msg job_info_msg_t

    cdef struct listjobs_info:
        uint32_t job_id

    ctypedef listjobs_info listjobs_info_t

    cdef struct listpids_info:
        uint32_t global_task_id
        uint32_t job_id
        uint32_t local_task_id
        pid_t pid
        char* step_id

    ctypedef listpids_info listpids_info_t

    cdef struct liststeps_info:
        uint32_t job_id
        char* step_id

    ctypedef liststeps_info liststeps_info_t

    ctypedef struct job_state_response_job_t:
        uint32_t job_id
        uint32_t array_job_id
        uint32_t array_task_id
        bitstr_t* array_task_id_bitmap
        uint32_t het_job_id
        uint32_t state

    ctypedef struct job_state_response_msg_t:
        uint32_t jobs_count
        job_state_response_job_t* jobs

    cdef struct step_update_request_msg:
        slurm_step_id_t step_id
        uint32_t time_limit

    ctypedef step_update_request_msg step_update_request_msg_t

    cdef struct suspend_exc_update_msg:
        char* update_str
        update_mode_t mode

    ctypedef suspend_exc_update_msg suspend_exc_update_msg_t

    ctypedef struct slurm_step_layout_req_t:
        char* node_list
        uint16_t* cpus_per_node
        uint32_t* cpu_count_reps
        uint32_t num_hosts
        uint32_t num_tasks
        uint16_t* cpus_per_task
        uint32_t* cpus_task_reps
        uint32_t task_dist
        uint16_t plane_size

    cdef struct slurm_step_layout:
        uint16_t* cpt_compact_array
        uint32_t cpt_compact_cnt
        uint32_t* cpt_compact_reps
        slurm_node_alias_addrs_t* alias_addrs
        uint32_t node_cnt
        char* node_list
        uint16_t plane_size
        uint16_t start_protocol_ver
        uint16_t* tasks
        uint32_t task_cnt
        uint32_t task_dist
        uint32_t** tids

    ctypedef slurm_step_layout slurm_step_layout_t

    cdef struct _slurm_step_io_fds_t_slurm_step_io_fds_t_slurm_step_io_fds_input_s:
        int fd
        uint32_t taskid
        uint32_t nodeid

    cdef struct _slurm_step_io_fds_t_slurm_step_io_fds_t_slurm_step_io_fds_out_s:
        int fd
        uint32_t taskid
        uint32_t nodeid

    cdef struct _slurm_step_io_fds_t_slurm_step_io_fds_t_slurm_step_io_fds_err_s:
        int fd
        uint32_t taskid
        uint32_t nodeid

    cdef struct slurm_step_io_fds:
        _slurm_step_io_fds_t_slurm_step_io_fds_t_slurm_step_io_fds_input_s input
        _slurm_step_io_fds_t_slurm_step_io_fds_t_slurm_step_io_fds_out_s out
        _slurm_step_io_fds_t_slurm_step_io_fds_t_slurm_step_io_fds_err_s err

    ctypedef slurm_step_io_fds slurm_step_io_fds_t

    cdef struct launch_tasks_response_msg:
        uint32_t return_code
        char* node_name
        uint32_t srun_node_id
        uint32_t count_of_pids
        uint32_t* local_pids
        slurm_step_id_t step_id
        uint32_t* task_ids

    ctypedef launch_tasks_response_msg launch_tasks_response_msg_t

    cdef struct task_ext_msg:
        uint32_t num_tasks
        uint32_t* task_id_list
        uint32_t return_code
        slurm_step_id_t step_id

    ctypedef task_ext_msg task_exit_msg_t

    ctypedef struct net_forward_msg_t:
        slurm_step_id_t step_id
        uint32_t flags
        uint16_t port
        char* target

    ctypedef slurm_step_id_t srun_ping_msg_t

    ctypedef slurm_step_id_t srun_job_complete_msg_t

    cdef struct srun_timeout_msg:
        slurm_step_id_t step_id
        time_t timeout

    ctypedef srun_timeout_msg srun_timeout_msg_t

    cdef struct srun_user_msg:
        slurm_step_id_t step_id
        char* msg

    ctypedef srun_user_msg srun_user_msg_t

    cdef struct srun_node_fail_msg:
        char* nodelist
        slurm_step_id_t step_id

    ctypedef srun_node_fail_msg srun_node_fail_msg_t

    cdef struct srun_step_missing_msg:
        char* nodelist
        slurm_step_id_t step_id

    ctypedef srun_step_missing_msg srun_step_missing_msg_t

    cdef enum suspend_opts:
        SUSPEND_JOB
        RESUME_JOB

    cdef struct suspend_msg:
        uint16_t op
        char* job_id_str
        slurm_step_id_t step_id

    ctypedef suspend_msg suspend_msg_t

    cdef struct top_job_msg:
        uint16_t op
        char* job_id_str

    ctypedef top_job_msg top_job_msg_t

    ctypedef struct slurm_step_launch_params_t:
        uint32_t argc
        char** argv
        uint32_t envc
        char** env
        char* container
        char* cwd
        uint32_t msg_timeout
        uint16_t ntasks_per_board
        uint16_t ntasks_per_core
        uint16_t ntasks_per_tres
        uint16_t ntasks_per_socket
        bool buffered_stdio
        bool labelio
        char* remote_output_filename
        char* remote_error_filename
        char* remote_input_filename
        slurm_step_io_fds_t local_fds
        bool multi_prog
        bool no_alloc
        uint32_t slurmd_debug
        uint32_t het_job_node_offset
        uint32_t het_job_id
        uint32_t het_job_nnodes
        uint32_t het_job_ntasks
        uint32_t het_job_step_cnt
        uint32_t* het_job_step_task_cnts
        uint16_t* het_job_task_cnts
        uint32_t** het_job_tids
        uint32_t* het_job_tid_offsets
        uint32_t het_job_offset
        uint32_t het_job_task_offset
        char* het_job_node_list
        bool parallel_debug
        uint32_t profile
        char* task_prolog
        char* task_epilog
        uint16_t cpu_bind_type
        char* cpu_bind
        uint32_t cpu_freq_min
        uint32_t cpu_freq_max
        uint32_t cpu_freq_gov
        uint16_t mem_bind_type
        char* mem_bind
        uint16_t accel_bind_type
        uint16_t max_sockets
        uint16_t max_cores
        uint16_t max_threads
        uint16_t cpus_per_task
        uint16_t* cpt_compact_array
        uint32_t cpt_compact_cnt
        uint32_t* cpt_compact_reps
        uint16_t threads_per_core
        uint32_t task_dist
        uint16_t tree_width
        bool preserve_env
        char* mpi_plugin_name
        uint8_t open_mode
        char* acctg_freq
        bool pty
        char** spank_job_env
        uint32_t spank_job_env_size
        char* tres_bind
        char* tres_freq
        uint16_t oom_kill_step

    ctypedef void (*_slurm_step_launch_callbacks_t_slurm_step_launch_callbacks_t_step_complete_ft)(srun_job_complete_msg_t*)

    ctypedef void (*_slurm_step_launch_callbacks_t_slurm_step_launch_callbacks_t_step_signal_ft)(int)

    ctypedef void (*_slurm_step_launch_callbacks_t_slurm_step_launch_callbacks_t_step_timeout_ft)(srun_timeout_msg_t*)

    ctypedef void (*_slurm_step_launch_callbacks_t_slurm_step_launch_callbacks_t_task_start_ft)(launch_tasks_response_msg_t*)

    ctypedef void (*_slurm_step_launch_callbacks_t_slurm_step_launch_callbacks_t_task_finish_ft)(task_exit_msg_t*)

    ctypedef struct slurm_step_launch_callbacks_t:
        _slurm_step_launch_callbacks_t_slurm_step_launch_callbacks_t_step_complete_ft step_complete
        _slurm_step_launch_callbacks_t_slurm_step_launch_callbacks_t_step_signal_ft step_signal
        _slurm_step_launch_callbacks_t_slurm_step_launch_callbacks_t_step_timeout_ft step_timeout
        _slurm_step_launch_callbacks_t_slurm_step_launch_callbacks_t_task_start_ft task_start
        _slurm_step_launch_callbacks_t_slurm_step_launch_callbacks_t_task_finish_ft task_finish

    ctypedef void (*_slurm_allocation_callbacks_t_slurm_allocation_callbacks_t_job_complete_ft)(srun_job_complete_msg_t*)

    ctypedef void (*_slurm_allocation_callbacks_t_slurm_allocation_callbacks_t_timeout_ft)(srun_timeout_msg_t*)

    ctypedef void (*_slurm_allocation_callbacks_t_slurm_allocation_callbacks_t_user_msg_ft)(srun_user_msg_t*)

    ctypedef void (*_slurm_allocation_callbacks_t_slurm_allocation_callbacks_t_node_fail_ft)(srun_node_fail_msg_t*)

    ctypedef void (*_slurm_allocation_callbacks_t_slurm_allocation_callbacks_t_job_suspend_ft)(suspend_msg_t*)

    ctypedef struct slurm_allocation_callbacks_t:
        _slurm_allocation_callbacks_t_slurm_allocation_callbacks_t_job_complete_ft job_complete
        _slurm_allocation_callbacks_t_slurm_allocation_callbacks_t_timeout_ft timeout
        _slurm_allocation_callbacks_t_slurm_allocation_callbacks_t_user_msg_ft user_msg
        _slurm_allocation_callbacks_t_slurm_allocation_callbacks_t_node_fail_ft node_fail
        _slurm_allocation_callbacks_t_slurm_allocation_callbacks_t_job_suspend_ft job_suspend

    ctypedef void (*_slurm_trigger_callbacks_t_slurm_trigger_callbacks_t_acct_full_ft)()

    ctypedef void (*_slurm_trigger_callbacks_t_slurm_trigger_callbacks_t_dbd_fail_ft)()

    ctypedef void (*_slurm_trigger_callbacks_t_slurm_trigger_callbacks_t_dbd_resumed_ft)()

    ctypedef void (*_slurm_trigger_callbacks_t_slurm_trigger_callbacks_t_db_fail_ft)()

    ctypedef void (*_slurm_trigger_callbacks_t_slurm_trigger_callbacks_t_db_resumed_ft)()

    ctypedef struct slurm_trigger_callbacks_t:
        _slurm_trigger_callbacks_t_slurm_trigger_callbacks_t_acct_full_ft acct_full
        _slurm_trigger_callbacks_t_slurm_trigger_callbacks_t_dbd_fail_ft dbd_fail
        _slurm_trigger_callbacks_t_slurm_trigger_callbacks_t_dbd_resumed_ft dbd_resumed
        _slurm_trigger_callbacks_t_slurm_trigger_callbacks_t_db_fail_ft db_fail
        _slurm_trigger_callbacks_t_slurm_trigger_callbacks_t_db_resumed_ft db_resumed

    ctypedef struct job_step_info_t:
        uint32_t array_job_id
        uint32_t array_task_id
        char* cluster
        char* container
        char* container_id
        uint32_t cpu_freq_min
        uint32_t cpu_freq_max
        uint32_t cpu_freq_gov
        char* cpus_per_tres
        char* cwd
        char* mem_per_tres
        char* name
        char* job_name
        char* network
        char* nodes
        int32_t* node_inx
        uint32_t num_cpus
        uint32_t num_tasks
        char* partition
        char* resv_ports
        time_t run_time
        char* srun_host
        uint32_t srun_pid
        time_t start_time
        uint16_t start_protocol_ver
        uint32_t state
        slurm_step_id_t step_id
        char* std_err
        char* std_in
        char* std_out
        char* submit_line
        uint32_t task_dist
        uint32_t time_limit
        char* tres_bind
        char* tres_fmt_alloc_str
        char* tres_freq
        char* tres_per_step
        char* tres_per_node
        char* tres_per_socket
        char* tres_per_task
        uint32_t user_id

    ctypedef struct stepmgr_job_info_t:
        slurm_step_id_t step_id
        char* stepmgr

    cdef struct job_step_info_response_msg:
        time_t last_update
        uint32_t job_step_count
        job_step_info_t* job_steps
        list_t* stepmgr_jobs

    ctypedef job_step_info_response_msg job_step_info_response_msg_t

    ctypedef struct job_step_pids_t:
        char* node_name
        uint32_t* pid
        uint32_t pid_cnt

    ctypedef struct job_step_pids_response_msg_t:
        list_t* pid_list
        slurm_step_id_t step_id

    ctypedef struct job_step_stat_t:
        jobacctinfo_t* jobacct
        uint32_t num_tasks
        uint32_t return_code
        job_step_pids_t* step_pids

    ctypedef struct job_step_stat_response_msg_t:
        list_t* stats_list
        slurm_step_id_t step_id

    cdef struct node_info:
        uint16_t alloc_cpus
        uint64_t alloc_memory
        char* alloc_tres_fmt_str
        char* arch
        char* bcast_address
        uint16_t boards
        time_t boot_time
        uint16_t cert_flags
        time_t cert_last_renewal
        char* cluster_name
        uint16_t cores
        uint16_t core_spec_cnt
        uint32_t cpu_bind
        uint32_t cpu_load
        uint64_t free_mem
        uint16_t cpus
        uint16_t cpus_efctv
        char* cpu_spec_list
        acct_gather_energy_t* energy
        char* extra
        char* features
        char* features_act
        char* gres
        char* gres_drain
        char* gres_used
        char* instance_id
        char* instance_type
        time_t last_busy
        char* mcs_label
        uint64_t mem_spec_limit
        char* name
        uint32_t next_state
        char* node_addr
        char* node_hostname
        uint32_t node_state
        char* os
        uint32_t owner
        char* parameters
        char* partitions
        uint16_t port
        uint64_t real_memory
        uint16_t res_cores_per_gpu
        char* gpu_spec
        char* comment
        char* reason
        time_t reason_time
        uint32_t reason_uid
        time_t resume_after
        char* resv_name
        time_t slurmd_start_time
        uint16_t sockets
        uint16_t threads
        uint32_t tmp_disk
        char* topology_str
        uint32_t weight
        char* tres_fmt_str
        char* version

    ctypedef node_info node_info_t

    cdef struct node_info_msg:
        time_t last_update
        uint32_t record_count
        node_info_t* node_array

    ctypedef node_info_msg node_info_msg_t

    cdef struct topo_info:
        uint16_t level
        uint32_t link_speed
        char* name
        char* nodes
        char* switches

    ctypedef topo_info topo_info_t

    cdef struct topo_info_request_msg:
        char* name

    ctypedef topo_info_request_msg topo_info_request_msg_t

    cdef struct topo_info_response_msg:
        void* topo_info

    ctypedef topo_info_response_msg topo_info_response_msg_t

    cdef struct topo_config_response_msg:
        char* config

    ctypedef topo_config_response_msg topo_config_response_msg_t

    cdef struct job_alloc_info_msg:
        slurm_step_id_t step_id
        char* req_cluster

    ctypedef job_alloc_info_msg job_alloc_info_msg_t

    ctypedef struct slurm_selected_step_t:
        bitstr_t* array_bitmap
        uint32_t array_task_id
        uint32_t het_job_offset
        slurm_step_id_t step_id

    ctypedef slurm_selected_step_t step_alloc_info_msg_t

    cdef struct acct_gather_node_resp_msg:
        acct_gather_energy_t* energy
        char* node_name
        uint16_t sensor_cnt

    ctypedef acct_gather_node_resp_msg acct_gather_node_resp_msg_t

    cdef struct acct_gather_energy_req_msg:
        uint16_t context_id
        uint16_t delta

    ctypedef acct_gather_energy_req_msg acct_gather_energy_req_msg_t

    cdef struct job_defaults:
        uint16_t type
        uint64_t value

    ctypedef job_defaults job_defaults_t

    cdef struct partition_info:
        char* allow_alloc_nodes
        char* allow_accounts
        char* allow_groups
        char* allow_qos
        char* alternate
        char* billing_weights_str
        char* cluster_name
        uint16_t cr_type
        uint32_t cpu_bind
        uint64_t def_mem_per_cpu
        uint32_t default_time
        char* deny_accounts
        char* deny_qos
        uint32_t flags
        uint32_t grace_time
        list_t* job_defaults_list
        char* job_defaults_str
        uint32_t max_cpus_per_node
        uint32_t max_cpus_per_socket
        uint64_t max_mem_per_cpu
        uint32_t max_nodes
        uint16_t max_share
        uint32_t max_time
        uint32_t min_nodes
        char* name
        int32_t* node_inx
        char* nodes
        char* nodesets
        uint16_t over_time_limit
        uint16_t preempt_mode
        uint16_t priority_job_factor
        uint16_t priority_tier
        char* qos_char
        uint16_t resume_timeout
        uint16_t state_up
        uint32_t suspend_time
        uint16_t suspend_timeout
        char* topology_name
        uint32_t total_cpus
        uint32_t total_nodes
        char* tres_fmt_str

    ctypedef partition_info partition_info_t

    cdef struct delete_partition_msg:
        char* name

    ctypedef delete_partition_msg delete_part_msg_t

    cdef struct resource_allocation_response_msg:
        char* account
        char* batch_host
        uint32_t cpu_freq_min
        uint32_t cpu_freq_max
        uint32_t cpu_freq_gov
        uint16_t* cpus_per_node
        uint32_t* cpu_count_reps
        uint32_t env_size
        char** environment
        uint32_t error_code
        gid_t gid
        char* group_name
        char* job_submit_user_msg
        uint32_t node_cnt
        char* node_list
        uint16_t ntasks_per_board
        uint16_t ntasks_per_core
        uint16_t ntasks_per_tres
        uint16_t ntasks_per_socket
        uint32_t num_cpu_groups
        char* partition
        uint64_t pn_min_memory
        char* qos
        char* resv_name
        uint16_t segment_size
        uint16_t start_protocol_ver
        slurm_step_id_t step_id
        char* tres_per_node
        char* tres_per_task
        uid_t uid
        char* user_name
        void* working_cluster_rec

    ctypedef resource_allocation_response_msg resource_allocation_response_msg_t

    cdef struct partition_info_msg:
        time_t last_update
        uint32_t record_count
        partition_info_t* partition_array

    ctypedef partition_info_msg partition_info_msg_t

    cdef struct will_run_response_msg:
        char* cluster_name
        char* job_submit_user_msg
        char* node_list
        char* part_name
        list_t* preemptee_job_id
        uint32_t proc_cnt
        slurm_step_id_t step_id
        time_t start_time

    ctypedef will_run_response_msg will_run_response_msg_t

    ctypedef struct ns_fd_map_t:
        int type
        int fd

    cdef struct resv_core_spec:
        char* node_name
        char* core_id

    ctypedef resv_core_spec resv_core_spec_t

    cdef struct reserve_info:
        char* accounts
        char* allowed_parts
        char* burst_buffer
        char* comment
        uint32_t core_cnt
        uint32_t core_spec_cnt
        resv_core_spec_t* core_spec
        time_t end_time
        char* features
        uint64_t flags
        char* groups
        char* licenses
        uint32_t max_start_delay
        char* name
        uint32_t node_cnt
        int32_t* node_inx
        char* node_list
        char* partition
        uint32_t purge_comp_time
        char* qos
        time_t start_time
        char* tres_str
        char* users

    ctypedef reserve_info reserve_info_t

    cdef struct reserve_info_msg:
        time_t last_update
        uint32_t record_count
        reserve_info_t* reservation_array

    ctypedef reserve_info_msg reserve_info_msg_t

    cdef struct resv_desc_msg:
        char* accounts
        char* allowed_parts
        char* burst_buffer
        char* comment
        uint32_t core_cnt
        uint32_t duration
        time_t end_time
        char* features
        uint64_t flags
        char* groups
        void* job_ptr
        char* licenses
        uint32_t max_start_delay
        char* name
        uint32_t node_cnt
        char* node_list
        char* partition
        uint32_t purge_comp_time
        char* qos
        time_t start_time
        time_t time_force
        char* tres_str
        char* users

    ctypedef resv_desc_msg resv_desc_msg_t

    cdef struct reserve_response_msg:
        char* name

    ctypedef reserve_response_msg reserve_response_msg_t

    cdef struct reservation_name_msg:
        char* name

    ctypedef reservation_name_msg reservation_name_msg_t

    ctypedef struct slurm_conf_t:
        time_t last_update
        char* accounting_storage_tres
        uint16_t accounting_storage_enforce
        char* accounting_storage_backup_host
        char* accounting_storage_ext_host
        char* accounting_storage_host
        char* accounting_storage_params
        char* accounting_storage_pass
        uint16_t accounting_storage_port
        char* accounting_storage_type
        void* acct_gather_conf
        char* acct_gather_energy_type
        char* acct_gather_profile_type
        char* acct_gather_interconnect_type
        char* acct_gather_filesystem_type
        uint16_t acct_gather_node_freq
        char* authalttypes
        char* authinfo
        char* authalt_params
        char* authtype
        uint16_t batch_start_timeout
        char* bb_type
        char* bcast_exclude
        char* bcast_parameters
        time_t boot_time
        char* certgen_params
        char* certgen_type
        char* certmgr_params
        char* certmgr_type
        void* cgroup_conf
        char* cli_filter_params
        char* cli_filter_plugins
        uint16_t cluster_id
        char* cluster_name
        char* comm_params
        uint16_t complete_wait
        uint32_t conf_flags
        char** control_addr
        uint32_t control_cnt
        char** control_machine
        uint32_t cpu_freq_def
        uint32_t cpu_freq_govs
        char* cred_type
        char* data_parser_parameters
        uint64_t debug_flags
        uint64_t def_mem_per_cpu
        char* dependency_params
        uint16_t eio_timeout
        uint16_t enforce_part_limits
        char** epilog
        uint32_t epilog_cnt
        uint32_t epilog_msg_time
        char** epilog_slurmctld
        uint32_t epilog_slurmctld_cnt
        uint16_t epilog_timeout
        char* fed_params
        uint32_t first_job_id
        uint16_t fs_dampening_factor
        uint16_t getnameinfo_cache_timeout
        char* gres_plugins
        uint16_t group_time
        uint16_t group_force
        char* gpu_freq_def
        char* hash_plugin
        uint32_t hash_val
        uint16_t health_check_interval
        uint16_t health_check_node_state
        char* health_check_program
        char* http_parser_type
        uint32_t host_unreach_retry_count
        uint16_t inactive_limit
        char* interactive_step_opts
        char* job_acct_gather_freq
        char* job_acct_gather_type
        char* job_acct_gather_params
        uint16_t job_acct_oom_kill
        char* job_comp_host
        char* job_comp_loc
        char* job_comp_params
        char* job_comp_pass
        char* job_comp_pass_script
        uint32_t job_comp_port
        char* job_comp_type
        char* job_comp_user
        char* namespace_plugin
        list_t* job_defaults_list
        uint16_t job_file_append
        uint16_t job_requeue
        char* job_submit_plugins
        uint32_t keepalive_interval
        uint32_t keepalive_probes
        uint32_t keepalive_time
        uint16_t kill_on_bad_exit
        uint16_t kill_wait
        char* launch_params
        char* licenses
        uint16_t log_fmt
        char* mail_domain
        char* mail_prog
        uint32_t max_array_sz
        uint32_t max_batch_requeue
        uint32_t max_dbd_msgs
        uint32_t max_job_cnt
        uint32_t max_job_id
        uint64_t max_mem_per_cpu
        uint32_t max_node_cnt
        uint32_t max_step_cnt
        uint16_t max_tasks_per_node
        char* mcs_plugin
        char* mcs_plugin_params
        char* metrics_type
        uint32_t min_job_age
        void* mpi_conf
        char* mpi_default
        char* mpi_params
        uint16_t msg_timeout
        uint32_t next_job_id
        void* node_features_conf
        char* node_features_plugins
        uint16_t over_time_limit
        char* plugindir
        char* plugstack
        uint32_t preempt_exempt_time
        uint16_t preempt_mode
        char* preempt_params
        char* preempt_type
        char* prep_params
        char* prep_plugins
        uint32_t priority_decay_hl
        uint32_t priority_calc_period
        uint16_t priority_favor_small
        uint16_t priority_flags
        uint32_t priority_max_age
        char* priority_params
        uint16_t priority_reset_period
        char* priority_type
        uint32_t priority_weight_age
        uint32_t priority_weight_assoc
        uint32_t priority_weight_fs
        uint32_t priority_weight_js
        uint32_t priority_weight_part
        uint32_t priority_weight_qos
        char* priority_weight_tres
        uint16_t private_data
        char* proctrack_type
        char** prolog
        uint32_t prolog_cnt
        char** prolog_slurmctld
        uint32_t prolog_slurmctld_cnt
        uint16_t prolog_timeout
        uint16_t propagate_prio_process
        uint16_t prolog_flags
        char* propagate_rlimits
        char* propagate_rlimits_except
        char* reboot_program
        uint16_t reconfig_flags
        char* requeue_exit
        char* requeue_exit_hold
        char* resume_fail_program
        char* resume_program
        uint16_t resume_rate
        uint16_t resume_timeout
        char* resv_epilog
        uint16_t resv_over_run
        char* resv_prolog
        uint16_t ret2service
        char* sched_logfile
        uint16_t sched_log_level
        char* sched_params
        uint16_t sched_time_slice
        char* schedtype
        char* scron_params
        char* select_type
        void* select_conf_key_pairs
        uint16_t select_type_param
        char* site_factor_plugin
        char* site_factor_params
        char* slurm_conf
        uint32_t slurm_user_id
        char* slurm_user_name
        uint32_t slurmd_user_id
        char* slurmd_user_name
        char* slurmctld_addr
        uint16_t slurmctld_debug
        char* slurmctld_logfile
        char* slurmctld_pidfile
        uint32_t slurmctld_port
        uint16_t slurmctld_port_count
        char* slurmctld_primary_off_prog
        char* slurmctld_primary_on_prog
        uint16_t slurmctld_syslog_debug
        uint16_t slurmctld_timeout
        char* slurmctld_params
        uint16_t slurmd_debug
        char* slurmd_logfile
        char* slurmd_params
        char* slurmd_pidfile
        uint32_t slurmd_port
        char* slurmd_spooldir
        uint16_t slurmd_syslog_debug
        uint16_t slurmd_timeout
        char* srun_epilog
        uint16_t* srun_port_range
        char* srun_prolog
        char* state_save_location
        char* suspend_exc_nodes
        char* suspend_exc_parts
        char* suspend_exc_states
        char* suspend_program
        uint16_t suspend_rate
        uint32_t suspend_time
        uint16_t suspend_timeout
        char* switch_type
        char* switch_param
        char* task_epilog
        char* task_plugin
        uint32_t task_plugin_param
        char* task_prolog
        char* tls_params
        char* tls_type
        uint16_t tcp_timeout
        char* tmp_fs
        char* topology_param
        char* topology_plugin
        uint16_t tree_width
        char* unkillable_program
        uint16_t unkillable_timeout
        char* url_parser_type
        char* version
        uint16_t vsize_factor
        uint16_t wait_time
        char* x11_params

    cdef struct slurmd_status_msg:
        time_t booted
        time_t last_slurmctld_msg
        uint16_t slurmd_debug
        uint16_t actual_cpus
        uint16_t actual_boards
        uint16_t actual_sockets
        uint16_t actual_cores
        uint16_t actual_threads
        uint64_t actual_real_mem
        uint32_t actual_tmp_disk
        uint32_t pid
        char* hostname
        char* slurmd_logfile
        char* step_list
        char* version

    ctypedef slurmd_status_msg slurmd_status_t

    cdef struct submit_response_msg:
        slurm_step_id_t step_id
        uint32_t error_code
        char* job_submit_user_msg

    ctypedef submit_response_msg submit_response_msg_t

    cdef struct slurm_update_node_msg:
        char* comment
        uint32_t cpu_bind
        char* cert_token
        char* extra
        char* features
        char* features_act
        char* gres
        char* instance_id
        char* instance_type
        char* node_addr
        char* node_hostname
        char* node_names
        uint32_t node_state
        char* reason
        uint32_t reason_uid
        uint32_t resume_after
        char* topology_str
        uint32_t weight

    ctypedef slurm_update_node_msg update_node_msg_t

    ctypedef partition_info update_part_msg_t

    cdef struct job_sbcast_cred_msg:
        char* node_list
        void* sbcast_cred

    ctypedef job_sbcast_cred_msg job_sbcast_cred_msg_t

    cdef struct sbcast_cred_req_msg:
        char* node_list

    ctypedef sbcast_cred_req_msg sbcast_cred_req_msg_t

    ctypedef struct token_request_msg_t:
        uint32_t lifespan
        char* username

    ctypedef struct token_response_msg_t:
        char* token

    ctypedef slurm_step_ctx_struct slurm_step_ctx_t

    cdef struct stats_info_request_msg:
        uint16_t command_id

    ctypedef stats_info_request_msg stats_info_request_msg_t

    cdef struct stats_info_response_msg:
        time_t req_time
        time_t req_time_start
        uint32_t server_thread_count
        uint32_t agent_queue_size
        uint32_t agent_count
        uint32_t agent_thread_count
        uint32_t dbd_agent_queue_size
        uint32_t gettimeofday_latency
        uint32_t schedule_cycle_max
        uint32_t schedule_cycle_last
        uint64_t schedule_cycle_sum
        uint32_t schedule_cycle_counter
        uint32_t schedule_cycle_depth
        uint32_t* schedule_exit
        uint32_t schedule_exit_cnt
        uint32_t schedule_queue_len
        uint32_t jobs_submitted
        uint32_t jobs_started
        uint32_t jobs_completed
        uint32_t jobs_canceled
        uint32_t jobs_failed
        uint32_t jobs_pending
        uint32_t jobs_running
        time_t job_states_ts
        uint32_t bf_backfilled_jobs
        uint32_t bf_last_backfilled_jobs
        uint32_t bf_backfilled_het_jobs
        uint32_t bf_cycle_counter
        uint64_t bf_cycle_sum
        uint32_t bf_cycle_last
        uint32_t bf_cycle_max
        uint32_t* bf_exit
        uint32_t bf_exit_cnt
        uint32_t bf_last_depth
        uint32_t bf_last_depth_try
        uint32_t bf_depth_sum
        uint32_t bf_depth_try_sum
        uint32_t bf_queue_len
        uint32_t bf_queue_len_sum
        uint32_t bf_table_size
        uint32_t bf_table_size_sum
        time_t bf_when_last_cycle
        uint32_t bf_active
        uint32_t rpc_type_size
        uint16_t* rpc_type_id
        uint32_t* rpc_type_cnt
        uint64_t* rpc_type_time
        uint8_t rpc_queue_enabled
        uint16_t* rpc_type_queued
        uint64_t* rpc_type_dropped
        uint16_t* rpc_type_cycle_last
        uint16_t* rpc_type_cycle_max
        uint32_t rpc_user_size
        uint32_t* rpc_user_id
        uint32_t* rpc_user_cnt
        uint64_t* rpc_user_time
        uint32_t rpc_queue_type_count
        uint32_t* rpc_queue_type_id
        uint32_t* rpc_queue_count
        uint32_t rpc_dump_count
        uint32_t* rpc_dump_types
        char** rpc_dump_hostlist

    ctypedef stats_info_response_msg stats_info_response_msg_t

    cdef struct trigger_info:
        uint16_t flags
        uint32_t trig_id
        uint16_t res_type
        char* res_id
        uint32_t control_inx
        uint32_t trig_type
        uint16_t offset
        uint32_t user_id
        char* program

    ctypedef trigger_info trigger_info_t

    cdef struct trigger_info_msg:
        uint32_t record_count
        trigger_info_t* trigger_array

    ctypedef trigger_info_msg trigger_info_msg_t

    cdef struct slurm_license_info:
        char* name
        uint32_t total
        uint32_t in_use
        uint32_t available
        uint8_t remote
        uint32_t reserved
        uint32_t last_consumed
        uint32_t last_deficit
        time_t last_update
        uint8_t mode
        char* nodes

    ctypedef slurm_license_info slurm_license_info_t

    cdef struct license_info_msg:
        time_t last_update
        uint32_t num_lic
        slurm_license_info_t* lic_array

    ctypedef license_info_msg license_info_msg_t

    ctypedef struct job_array_resp_msg_t:
        uint32_t job_array_count
        char** job_array_id
        uint32_t* error_code
        char** err_msg

    ctypedef struct assoc_mgr_info_msg_t:
        list_t* assoc_list
        list_t* qos_list
        uint32_t tres_cnt
        char** tres_names
        list_t* user_list

    ctypedef struct assoc_mgr_info_request_msg_t:
        list_t* acct_list
        uint32_t flags
        list_t* qos_list
        list_t* user_list

    cdef struct network_callerid_msg:
        unsigned char ip_src[16]
        unsigned char ip_dst[16]
        uint32_t port_src
        uint32_t port_dst
        int32_t af

    ctypedef network_callerid_msg network_callerid_msg_t

    int slurm_get_cluster_info(list_t** cluster_records, char* cluster_names, uint16_t show_flags)

    void slurm_init_job_desc_msg(job_desc_msg_t* job_desc_msg)

    int slurm_allocate_resources(job_desc_msg_t* job_desc_msg, resource_allocation_response_msg_t** job_alloc_resp_msg)

    ctypedef void (*_slurm_allocate_resources_blocking_pending_callback_ft)(slurm_step_id_t* step_id)

    resource_allocation_response_msg_t* slurm_allocate_resources_blocking(const job_desc_msg_t* user_req, time_t timeout, _slurm_allocate_resources_blocking_pending_callback_ft pending_callback)

    void slurm_free_resource_allocation_response_msg(resource_allocation_response_msg_t* msg)

    ctypedef void (*_slurm_allocate_het_job_blocking_pending_callback_ft)(slurm_step_id_t* step_id)

    list_t* slurm_allocate_het_job_blocking(list_t* job_req_list, time_t timeout, _slurm_allocate_het_job_blocking_pending_callback_ft pending_callback)

    int slurm_allocation_lookup(uint32_t job_id, resource_allocation_response_msg_t** resp)

    int slurm_het_job_lookup(uint32_t jobid, list_t** resp)

    char* slurm_read_hostfile(const char* filename, int n)

    allocation_msg_thread_t* slurm_allocation_msg_thr_create(uint16_t* port, const slurm_allocation_callbacks_t* callbacks)

    void slurm_allocation_msg_thr_destroy(allocation_msg_thread_t* msg_thr)

    int slurm_submit_batch_job(job_desc_msg_t* job_desc_msg, submit_response_msg_t** slurm_alloc_msg)

    int slurm_submit_batch_het_job(list_t* job_req_list, submit_response_msg_t** slurm_alloc_msg)

    void slurm_free_submit_response_response_msg(submit_response_msg_t* msg)

    int slurm_job_batch_script(FILE* out, uint32_t jobid)

    int slurm_job_will_run(job_desc_msg_t* job_desc_msg)

    int slurm_het_job_will_run(list_t* job_req_list)

    int slurm_job_will_run2(job_desc_msg_t* req, will_run_response_msg_t** will_run_resp)

    int slurm_sort_will_run_resp(void* a, void* b)

    int slurm_sbcast_lookup(slurm_selected_step_t* selected_step, job_sbcast_cred_msg_t** info)

    void slurm_free_sbcast_cred_msg(job_sbcast_cred_msg_t* msg)

    int slurm_load_licenses(time_t, license_info_msg_t**, uint16_t)

    void slurm_free_license_info_msg(license_info_msg_t*)

    int slurm_load_assoc_mgr_info(assoc_mgr_info_request_msg_t*, assoc_mgr_info_msg_t**)

    void slurm_free_assoc_mgr_info_msg(assoc_mgr_info_msg_t*)

    void slurm_free_assoc_mgr_info_request_members(assoc_mgr_info_request_msg_t*)

    void slurm_free_assoc_mgr_info_request_msg(assoc_mgr_info_request_msg_t*)

    cdef struct job_step_kill_msg:
        char* sjob_id
        uint16_t signal
        uint16_t flags
        char* sibling
        slurm_step_id_t step_id

    ctypedef job_step_kill_msg job_step_kill_msg_t

    ctypedef struct kill_jobs_msg_t:
        char* account
        char* admin_comment
        uint16_t flags
        char* job_name
        char** jobs_array
        uint32_t jobs_cnt
        char* partition
        char* qos
        char* reservation
        uint16_t signal
        uint32_t state
        uint32_t user_id
        char* user_name
        char* wckey
        char* nodelist

    ctypedef struct kill_jobs_resp_job_t:
        uint32_t error_code
        char* error_msg
        slurm_selected_step_t* id
        uint32_t real_job_id
        char* sibling_name

    ctypedef struct kill_jobs_resp_msg_t:
        kill_jobs_resp_job_t* job_responses
        uint32_t jobs_cnt

    int slurm_kill_job(uint32_t job_id, uint16_t signal, uint16_t flags)

    int slurm_kill_job_step(slurm_step_id_t* step_id, uint16_t signal, uint16_t flags)

    int slurm_kill_job2(const char* job_id, uint16_t signal, uint16_t flags, const char* sibling)

    int slurm_kill_jobs(kill_jobs_msg_t* kill_msg, kill_jobs_resp_msg_t** kill_msg_resp)

    int slurm_signal_job(uint32_t job_id, uint16_t signal)

    int slurm_signal_job_step(slurm_step_id_t* step_id, uint32_t signal)

    int slurm_complete_job(slurm_step_id_t* step_id, uint32_t job_return_code)

    int slurm_terminate_job_step(slurm_step_id_t* step_id)

    void slurm_step_launch_params_t_init(slurm_step_launch_params_t* ptr)

    int slurm_step_launch(slurm_step_ctx_t* ctx, const slurm_step_launch_params_t* params, const slurm_step_launch_callbacks_t* callbacks)

    int slurm_step_launch_add(slurm_step_ctx_t* ctx, slurm_step_ctx_t* first_ctx, const slurm_step_launch_params_t* params, char* node_list)

    int slurm_step_launch_wait_start(slurm_step_ctx_t* ctx)

    void slurm_step_launch_wait_finish(slurm_step_ctx_t* ctx)

    void slurm_step_launch_abort(slurm_step_ctx_t* ctx)

    void slurm_step_launch_fwd_signal(slurm_step_ctx_t* ctx, int signo)

    void slurm_step_launch_fwd_wake(slurm_step_ctx_t* ctx)

    long slurm_api_version()

    int slurm_load_ctl_conf(time_t update_time, slurm_conf_t** slurm_ctl_conf_ptr)

    void slurm_free_ctl_conf(slurm_conf_t* slurm_ctl_conf_ptr)

    void slurm_print_ctl_conf(FILE* out, slurm_conf_t* slurm_ctl_conf_ptr)

    void slurm_write_ctl_conf(slurm_conf_t* slurm_ctl_conf_ptr, node_info_msg_t* node_info_ptr, partition_info_msg_t* part_info_ptr)

    void* slurm_ctl_conf_2_key_pairs(slurm_conf_t* slurm_ctl_conf_ptr)

    void slurm_print_key_pairs(FILE* out, void* key_pairs, char* title)

    int slurm_load_slurmd_status(slurmd_status_t** slurmd_status_ptr)

    void slurm_free_slurmd_status(slurmd_status_t* slurmd_status_ptr)

    void slurm_print_slurmd_status(FILE* out, slurmd_status_t* slurmd_status_ptr)

    void slurm_init_update_step_msg(step_update_request_msg_t* step_msg)

    int slurm_get_statistics(stats_info_response_msg_t** buf, stats_info_request_msg_t* req)

    int slurm_reset_statistics(stats_info_request_msg_t* req)

    int slurm_get_resource_layout(slurm_step_id_t* step_id, void** response)

    void slurm_free_job_info_msg(job_info_msg_t* job_buffer_ptr)

    void slurm_free_job_state_response_msg(job_state_response_msg_t* msg)

    void slurm_free_priority_factors_response_msg(priority_factors_response_msg_t* factors_resp)

    int slurm_get_end_time(uint32_t jobid, time_t* end_time_ptr)

    void slurm_get_job_stderr(char* buf, int buf_size, job_info_t* job_ptr)

    void slurm_get_job_stdin(char* buf, int buf_size, job_info_t* job_ptr)

    void slurm_get_job_stdout(char* buf, int buf_size, job_info_t* job_ptr)

    char* slurm_expand_step_stdio_fields(char* path, job_step_info_t* step)

    char* slurm_expand_job_stdio_fields(char* path, job_info_t* job)

    long slurm_get_rem_time(uint32_t jobid)

    int slurm_job_node_ready(uint32_t job_id)

    int slurm_load_job(job_info_msg_t** resp, uint32_t job_id, uint16_t show_flags)

    int slurm_load_job_sluid(job_info_msg_t** resp, sluid_t sluid, uint16_t show_flags)

    int slurm_load_job_prio(priority_factors_response_msg_t** factors_resp, uint16_t show_flags)

    int slurm_load_job_user(job_info_msg_t** job_info_msg_pptr, uint32_t user_id, uint16_t show_flags)

    int slurm_load_jobs(time_t update_time, job_info_msg_t** job_info_msg_pptr, uint16_t show_flags)

    int slurm_load_job_state(int job_id_count, slurm_selected_step_t* job_ids, job_state_response_msg_t** jsr_pptr)

    int slurm_notify_job(uint32_t job_id, char* message)

    int slurm_pid2jobid(pid_t job_pid, uint32_t* job_id_ptr)

    int slurm_update_job(job_desc_msg_t* job_msg)

    int slurm_update_job2(job_desc_msg_t* job_msg, job_array_resp_msg_t** resp)

    int slurm_get_job_steps(slurm_step_id_t* step_id, job_step_info_response_msg_t** resp, uint16_t show_flags)

    int slurm_find_step_ids_by_container_id(uint16_t show_flags, uid_t uid, const char* container_id, list_t* steps)

    void slurm_free_job_step_info_response_msg(job_step_info_response_msg_t* msg)

    slurm_step_layout_t* slurm_job_step_layout_get(slurm_step_id_t* step_id)

    int slurm_job_step_stat(slurm_step_id_t* step_id, char* node_list, uint16_t use_protocol_ver, job_step_stat_response_msg_t** resp)

    int slurm_job_step_get_pids(slurm_step_id_t* step_id, char* node_list, job_step_pids_response_msg_t** resp)

    void slurm_job_step_layout_free(slurm_step_layout_t* layout)

    void slurm_job_step_pids_free(job_step_pids_t* object)

    void slurm_job_step_pids_response_msg_free(void* object)

    void slurm_job_step_stat_free(job_step_stat_t* object)

    void slurm_job_step_stat_response_msg_free(void* object)

    int slurm_update_step(step_update_request_msg_t* step_msg)

    void slurm_destroy_selected_step(void* object)

    int slurm_load_node(time_t update_time, node_info_msg_t** resp, uint16_t show_flags)

    int slurm_load_node2(time_t update_time, node_info_msg_t** resp, uint16_t show_flags, slurmdb_cluster_rec_t* cluster)

    int slurm_load_node_single(node_info_msg_t** resp, char* node_name, uint16_t show_flags)

    int slurm_load_node_single2(node_info_msg_t** resp, char* node_name, uint16_t show_flags, slurmdb_cluster_rec_t* cluster)

    void slurm_populate_node_partitions(node_info_msg_t* node_buffer_ptr, partition_info_msg_t* part_buffer_ptr)

    int slurm_get_node_energy(char* host, uint16_t context_id, uint16_t delta, uint16_t* sensors_cnt, acct_gather_energy_t** energy)

    int slurm_get_node_alias_addrs(char* node_list, slurm_node_alias_addrs_t** alias_addrs)

    int slurm_controller_hostlist_expansion(const char* hostlist, char** expanded)

    void slurm_free_node_info_msg(node_info_msg_t* node_buffer_ptr)

    void slurm_print_node_info_msg(FILE* out, node_info_msg_t* node_info_msg_ptr, int one_liner)

    void slurm_print_node_table(FILE* out, node_info_t* node_ptr, int one_liner)

    char* slurm_sprint_node_table(node_info_t* node_ptr, int one_liner)

    void slurm_init_update_node_msg(update_node_msg_t* update_node_msg)

    int slurm_create_node(update_node_msg_t* node_msg)

    int slurm_update_node(update_node_msg_t* node_msg)

    int slurm_delete_node(update_node_msg_t* node_msg)

    int slurm_load_topo(topo_info_response_msg_t** topo_info_msg_pptr, char* name)

    int slurm_load_topo_config(topo_config_response_msg_t** resp)

    void slurm_free_topo_info_msg(topo_info_response_msg_t* msg)

    void slurm_free_topo_config_msg(topo_config_response_msg_t* msg)

    void slurm_free_topo_request_msg(topo_info_request_msg_t* msg)

    void slurm_print_topo_info_msg(FILE* out, topo_info_response_msg_t* topo_info_msg_ptr, char* node_list, char* unit, int one_liner)

    void slurm_init_part_desc_msg(update_part_msg_t* update_part_msg)

    int slurm_load_partitions(time_t update_time, partition_info_msg_t** part_buffer_ptr, uint16_t show_flags)

    int slurm_load_partitions2(time_t update_time, partition_info_msg_t** resp, uint16_t show_flags, slurmdb_cluster_rec_t* cluster)

    void slurm_free_partition_info_msg(partition_info_msg_t* part_info_ptr)

    void slurm_print_partition_info(FILE* out, partition_info_t* part_ptr, int one_liner)

    char* slurm_sprint_partition_info(partition_info_t* part_ptr, int one_liner)

    int slurm_create_partition(update_part_msg_t* part_msg)

    int slurm_update_partition(update_part_msg_t* part_msg)

    int slurm_delete_partition(delete_part_msg_t* part_msg)

    void slurm_init_resv_desc_msg(resv_desc_msg_t* update_resv_msg)

    char* slurm_create_reservation(resv_desc_msg_t* resv_msg)

    int slurm_update_reservation(resv_desc_msg_t* resv_msg)

    int slurm_delete_reservation(reservation_name_msg_t* resv_msg)

    int slurm_load_reservations(time_t update_time, reserve_info_msg_t** resp)

    void slurm_print_reservation_info_msg(FILE* out, reserve_info_msg_t* resv_info_ptr, int one_liner)

    void slurm_print_reservation_info(FILE* out, reserve_info_t* resv_ptr, int one_liner)

    char* slurm_sprint_reservation_info(reserve_info_t* resv_ptr, int one_liner)

    void slurm_free_reservation_info_msg(reserve_info_msg_t* resv_info_ptr)

    ctypedef struct controller_ping_t:
        char* hostname
        bool pinged
        long latency
        int offset

    ctypedef struct slurmdbd_ping_t:
        char* hostname
        bool pinged
        long latency
        int offset

    int slurm_ping(int dest)

    controller_ping_t* ping_all_controllers()

    int slurm_reconfigure()

    int slurm_shutdown(uint16_t options)

    int slurm_takeover(int backup_inx)

    int slurm_set_debugflags(uint64_t debug_flags_plus, uint64_t debug_flags_minus)

    int slurm_set_slurmd_debug_flags(char* node_list, uint64_t debug_flags_plus, uint64_t debug_flags_minus)

    int slurm_set_slurmd_debug_level(char* node_list, uint32_t debug_level)

    int slurm_set_debug_level(uint32_t debug_level)

    int slurm_set_schedlog_level(uint32_t schedlog_level)

    int slurm_set_fs_dampeningfactor(uint16_t factor)

    int slurm_update_suspend_exc_nodes(char* nodes, update_mode_t mode)

    int slurm_update_suspend_exc_parts(char* parts, update_mode_t mode)

    int slurm_update_suspend_exc_states(char* states, update_mode_t mode)

    int slurm_suspend(uint32_t job_id)

    int slurm_suspend2(char* job_id, job_array_resp_msg_t** resp)

    int slurm_resume(uint32_t job_id)

    int slurm_resume2(char* job_id, job_array_resp_msg_t** resp)

    void slurm_free_job_array_resp(job_array_resp_msg_t* resp)

    int slurm_requeue(uint32_t job_id, uint32_t flags)

    int slurm_requeue2(char* job_id, uint32_t flags, job_array_resp_msg_t** resp)

    int slurm_set_trigger(trigger_info_t* trigger_set)

    int slurm_clear_trigger(trigger_info_t* trigger_clear)

    int slurm_get_triggers(trigger_info_msg_t** trigger_get)

    int slurm_pull_trigger(trigger_info_t* trigger_pull)

    void slurm_free_trigger_msg(trigger_info_msg_t* trigger_free)

    void slurm_init_trigger_msg(trigger_info_t* trigger_info_msg)

    ctypedef struct burst_buffer_pool_t:
        uint64_t granularity
        char* name
        uint64_t total_space
        uint64_t used_space
        uint64_t unfree_space

    ctypedef struct burst_buffer_resv_t:
        char* account
        uint32_t array_job_id
        uint32_t array_task_id
        time_t create_time
        uint32_t job_id
        char* name
        char* partition
        char* pool
        char* qos
        uint64_t size
        uint16_t state
        uint32_t user_id

    ctypedef struct burst_buffer_use_t:
        uint32_t user_id
        uint64_t used

    ctypedef struct burst_buffer_info_t:
        char* allow_users
        char* default_pool
        char* create_buffer
        char* deny_users
        char* destroy_buffer
        uint32_t flags
        char* get_sys_state
        char* get_sys_status
        uint64_t granularity
        uint32_t pool_cnt
        burst_buffer_pool_t* pool_ptr
        char* name
        uint32_t poll_interval
        uint32_t other_timeout
        uint32_t stage_in_timeout
        uint32_t stage_out_timeout
        char* start_stage_in
        char* start_stage_out
        char* stop_stage_in
        char* stop_stage_out
        uint64_t total_space
        uint64_t unfree_space
        uint64_t used_space
        uint32_t validate_timeout
        uint32_t buffer_count
        burst_buffer_resv_t* burst_buffer_resv_ptr
        uint32_t use_count
        burst_buffer_use_t* burst_buffer_use_ptr

    ctypedef struct burst_buffer_info_msg_t:
        burst_buffer_info_t* burst_buffer_array
        uint32_t record_count

    char* slurm_burst_buffer_state_string(uint16_t state)

    int slurm_load_burst_buffer_stat(int argc, char** argv, char** status_resp)

    int slurm_load_burst_buffer_info(burst_buffer_info_msg_t** burst_buffer_info_msg_pptr)

    void slurm_free_burst_buffer_info_msg(burst_buffer_info_msg_t* burst_buffer_info_msg)

    void slurm_print_burst_buffer_info_msg(FILE* out, burst_buffer_info_msg_t* info_ptr, int one_liner, int verbosity)

    void slurm_print_burst_buffer_record(FILE* out, burst_buffer_info_t* burst_buffer_ptr, int one_liner, int verbose)

    int slurm_network_callerid(network_callerid_msg_t req, uint32_t* job_id, char* node_name, int node_name_size)

    int slurm_top_job(char* job_id_str)

    char* slurm_fetch_token(char* username, int lifespan)

    int slurm_load_federation(void** fed_pptr)

    void slurm_print_federation(void* fed)

    void slurm_destroy_federation_rec(void* fed)

    int slurm_request_crontab(uid_t uid, char** crontab, char** disabled_lines)

    ctypedef struct crontab_update_response_msg_t:
        char* err_msg
        char* failed_lines
        uint32_t* jobids
        uint32_t jobids_count
        char* job_submit_user_msg
        uint32_t return_code

    crontab_update_response_msg_t* slurm_update_crontab(uid_t uid, gid_t gid, char* crontab, list_t* jobs)

    int slurm_remove_crontab(uid_t uid, gid_t gid)
