You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.5 KiB
54 lines
1.5 KiB
///////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (c) Microsoft Corp. All rights reserved.
|
|
//
|
|
// FILE
|
|
//
|
|
// radutil.h
|
|
//
|
|
// SYNOPSIS
|
|
//
|
|
// This file declares methods for converting attributes to and from
|
|
// RADIUS wire format.
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _RADUTIL_H_
|
|
#define _RADUTIL_H_
|
|
#if _MSC_VER >= 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
namespace RadiusUtil
|
|
{
|
|
//////////
|
|
// Decodes an octet string into a newly-allocated IAS Attribute of the
|
|
// specified type.
|
|
//////////
|
|
PIASATTRIBUTE decode(
|
|
IASTYPE dstType,
|
|
PBYTE src,
|
|
ULONG srclen
|
|
);
|
|
|
|
//////////
|
|
// Returns the size in bytes of the IASATTRIBUTE when converted to RADIUS
|
|
// wire format. This does NOT include the attribute header.
|
|
//////////
|
|
ULONG getEncodedSize(
|
|
const IASATTRIBUTE& src
|
|
);
|
|
|
|
//////////
|
|
// Encodes the IASATTRIBUTE into RADIUS wire format and copies the value
|
|
// to the buffer pointed to by 'dst'. The caller should ensure that the
|
|
// destination buffer is large enough by first calling getEncodedSize.
|
|
// This method only encodes the attribute value, not the header.
|
|
//////////
|
|
void encode(
|
|
PBYTE dst,
|
|
const IASATTRIBUTE& src
|
|
) throw ();
|
|
};
|
|
|
|
#endif // _RADUTIL_H_
|