"%c%c%c%c", /* Reserved = 0 */
0, 0, 0, 0);
- write64_le(tw, ptr + 24);
+ Curl_write64_le(tw, ptr + 24);
memcpy(ptr + 32, challenge_client, 8);
memcpy(ptr + 44, ntlm->target_info, ntlm->target_info_len);
unsigned int target_info_offset = 0;
if(size >= 48) {
- target_info_len = readshort_le(&buffer[40]);
- target_info_offset = readint_le(&buffer[44]);
+ target_info_len = Curl_read16_le(&buffer[40]);
+ target_info_offset = Curl_read32_le(&buffer[44]);
if(target_info_len > 0) {
if(((target_info_offset + target_info_len) > size) ||
(target_info_offset < 48)) {
return CURLE_BAD_CONTENT_ENCODING;
}
- ntlm->flags = readint_le(&type2[20]);
+ ntlm->flags = Curl_read32_le(&type2[20]);
memcpy(ntlm->nonce, &type2[24], 8);
if(ntlm->flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) {
* package to whatever endian format we're using natively. Argument is a
* pointer to a 2 byte buffer.
*/
-unsigned short readshort_le(unsigned char *buf)
+unsigned short Curl_read16_le(unsigned char *buf)
{
return (unsigned short)(((unsigned short)buf[0]) |
((unsigned short)buf[1] << 8));
* incoming package to whatever endian format we're using natively.
* Argument is a pointer to a 4 byte buffer.
*/
-unsigned int readint_le(unsigned char *buf)
+unsigned int Curl_read32_le(unsigned char *buf)
{
return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8) |
((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24);
}
-void write32_le(const int value, unsigned char *buffer)
+void Curl_write32_le(const int value, unsigned char *buffer)
{
buffer[0] = (char)(value & 0x000000FF);
buffer[1] = (char)((value & 0x0000FF00) >> 8);
#if (CURL_SIZEOF_CURL_OFF_T > 4)
#if defined(HAVE_LONGLONG)
-void write64_le(const long long value, unsigned char *buffer)
+void Curl_write64_le(const long long value, unsigned char *buffer)
#else
-void write64_le(const __int64 value, unsigned char *buffer)
+void Curl_write64_le(const __int64 value, unsigned char *buffer)
#endif
{
- write32_le((int)value, buffer);
- write32_le((int)(value >> 32), buffer + 4);
+ Curl_write32_le((int)value, buffer);
+ Curl_write32_le((int)(value >> 32), buffer + 4);
}
#endif
*
***************************************************************************/
-unsigned short readshort_le(unsigned char *buf);
-unsigned int readint_le(unsigned char *buf);
+unsigned short Curl_read16_le(unsigned char *buf);
+unsigned int Curl_read32_le(unsigned char *buf);
-void write32_le(const int value, unsigned char *buffer);
+void Curl_write32_le(const int value, unsigned char *buffer);
#if (CURL_SIZEOF_CURL_OFF_T > 4)
#if defined(HAVE_LONGLONG)
-void write64_le(const long long value, unsigned char *buffer);
+void Curl_write64_le(const long long value, unsigned char *buffer);
#else
-void write64_le(const __int64 value, unsigned char *buffer);
+void Curl_write64_le(const __int64 value, unsigned char *buffer);
#endif
#endif