rtputil.c

来自「h.248协议源码」· C语言 代码 · 共 31 行

C
31
字号
/*

  NOTICE:
  This document contains information that is proprietary to RADVision LTD..
  No part of this publication may be reproduced in any form whatsoever without 
  written prior approval by RADVision LTD..
  
    RADVision LTD. reserves the right to revise this publication and make changes 
    without obligation to notify any person of such revisions or changes.
    
*/ 

#include "rtputil.h"
#include "rvsocket.h"

void* ConvertToNetwork(void *data, int pos, int n) {
	int i;
    for (i = pos; i < pos + n; ++i) 
	  ((RvUint32*)data)[i] = htonl(((RvUint32*)data)[i]);

    return data;
}

void* ConvertFromNetwork(void *data, int pos, int n) {
	int i;
	for (i = pos; i < pos + n; ++i) 
	  ((RvUint32*)data)[i] = ntohl(((RvUint32*)data)[i]);

	return data;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?