HP-UX
1752478 회원
5692 온라인
108788 솔루션
새 메시지

32KB 이상 파일 UDP전송 실패

 
노현준
신규 회원

32KB 이상 파일 UDP전송 실패

안녕하세요..



내부적으로 UDP로 파일을 전송하려 하는데..32KB이상되는 파일을 전송하려면 밑에 처럼 에러가 나옵니다..



-----------------------------------

sh: a.out: not found.

/home/crevol/src/test]./a.out

Send Buffer = (262144)

Recv Buffer = (262144)

strlen = (32770) <- file size

sendto() fail (ret = -1)

SndUnixSocket() fail (errno = 218)



--------------------------------------



반면에 32KB 이하 파일 전송할때는 문제 없습니다.



/home/crevol/src/test]./a.out

Send Buffer = (262144)

Recv Buffer = (262144)

strlen = (32700) <- file size

SendLen = (32700)

RecvLen = (32700)



---------------------------------------



어떤 파라메터를 조종해야 이부분을 해결할수 있을까요?

NFS전송은 아니구요..

방법을 알려주세요.

그리고 ndd명령으로 udp send 버퍼를 늘릴수도 없네요.

ndd -set sockets socket_sndbuf_default 262140

로 늘릴려고 해도 65535이상으로는 안됩니다..이것과 연관이 있나요?

1 응답 1
김병수
본과생

32KB 이상 파일 UDP전송 실패

잘은 모르겠으나 itrc에 아래와 같은 내용이 있네요.

관련 patch를 적용하여 보시기 바랍니다.

error number 218은

# define EMSGSIZE 218 /* Message too long */

입니다.



Problem Text



CR# JAGad73536

problem

I am able to verify on hp-ux 11.0 system that the cu is correct in

stating, that (as documented in "man 7p udp") datagrams up to 65507

bytes are transmitted and sizes of 65508 and up are not transmitted

but HP-UX (11.X)silently drops the data and only returns EMSGSIZE when

the send is larger than the socket-buffer, but not necessarily when

the send is larger than the protocol supports.



The customer believes it is OK per the RFC for udp to silently drop

datagrams of 65508 and up, but states that it is less programmer-

friendly to drop them silently and would like hp-ux (11.X) to return

an error.









Symptom:

UDP datagrams are silently dropped.

Defect Description:

A UDP packet size greater than the allowable

IP limit is dropped with no errno.



Fix Text



fix

Fix submitted to both 11.0 and 11.11 PIB branches.

Added logic in sosend() function to return EMSGSIZE errno when

data size exceeding IP limit.



Fix available in 11.00 Patch PHNE_28538

Fix available in 11.11 Patch PHNE_28895



그럼~~