mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
port allocator: make port range constant object
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
committed by
Michal Privoznik
parent
5dbda5e972
commit
9c61c28081
@@ -130,10 +130,10 @@ struct _libxlDriverPrivate {
|
|||||||
/* Immutable pointer, self-locking APIs */
|
/* Immutable pointer, self-locking APIs */
|
||||||
virObjectEventStatePtr domainEventState;
|
virObjectEventStatePtr domainEventState;
|
||||||
|
|
||||||
/* Immutable pointer, self-locking APIs */
|
/* Immutable pointer, immutable object */
|
||||||
virPortAllocatorRangePtr reservedGraphicsPorts;
|
virPortAllocatorRangePtr reservedGraphicsPorts;
|
||||||
|
|
||||||
/* Immutable pointer, self-locking APIs */
|
/* Immutable pointer, immutable object */
|
||||||
virPortAllocatorRangePtr migrationPorts;
|
virPortAllocatorRangePtr migrationPorts;
|
||||||
|
|
||||||
/* Immutable pointer, lockless APIs*/
|
/* Immutable pointer, lockless APIs*/
|
||||||
|
|||||||
@@ -263,13 +263,13 @@ struct _virQEMUDriver {
|
|||||||
/* Immutable pointer. Unsafe APIs. XXX */
|
/* Immutable pointer. Unsafe APIs. XXX */
|
||||||
virHashTablePtr sharedDevices;
|
virHashTablePtr sharedDevices;
|
||||||
|
|
||||||
/* Immutable pointer, self-locking APIs */
|
/* Immutable pointer, immutable object */
|
||||||
virPortAllocatorRangePtr remotePorts;
|
virPortAllocatorRangePtr remotePorts;
|
||||||
|
|
||||||
/* Immutable pointer, self-locking APIs */
|
/* Immutable pointer, immutable object */
|
||||||
virPortAllocatorRangePtr webSocketPorts;
|
virPortAllocatorRangePtr webSocketPorts;
|
||||||
|
|
||||||
/* Immutable pointer, self-locking APIs */
|
/* Immutable pointer, immutable object */
|
||||||
virPortAllocatorRangePtr migrationPorts;
|
virPortAllocatorRangePtr migrationPorts;
|
||||||
|
|
||||||
/* Immutable pointer, lockless APIs*/
|
/* Immutable pointer, lockless APIs*/
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ virPortAllocatorGet(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
virPortAllocatorAcquire(virPortAllocatorRangePtr range,
|
virPortAllocatorAcquire(const virPortAllocatorRange *range,
|
||||||
unsigned short *port)
|
unsigned short *port)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ virPortAllocatorRangeNew(const char *name,
|
|||||||
|
|
||||||
void virPortAllocatorRangeFree(virPortAllocatorRangePtr range);
|
void virPortAllocatorRangeFree(virPortAllocatorRangePtr range);
|
||||||
|
|
||||||
int virPortAllocatorAcquire(virPortAllocatorRangePtr range,
|
int virPortAllocatorAcquire(const virPortAllocatorRange *range,
|
||||||
unsigned short *port);
|
unsigned short *port);
|
||||||
|
|
||||||
int virPortAllocatorRelease(unsigned short port);
|
int virPortAllocatorRelease(unsigned short port);
|
||||||
|
|||||||
Reference in New Issue
Block a user