Modification of sipconf for screen sharing
Kazuumi Koguchi
Columbia University
New York, NY 10027
USA
koguchi@cs.columbia.edu
Introduction
I added screen sharing function to sipconf.
This document describes the modification parts of sipconf.
Requirements
- Receive 'INVITE' message including 'vncserver' or 'vncviewer'
as a media type in m line;
m=application 5905 TCP vncserver
m=application 5505 TCP vncviewer
- In case of a vncserver participant, receive a password
included in k line of 'INVITE' message and use it for VNC authentication;
- In case of a vncviewer participant, create a random password
for VNC authentication and send it to the participant in k line of
'200 OK' message. The password is different for each participant.
- When there is a vncserver participant and another participant
sends "INVITE' message as a vncserver, sipconf rejects the request.
- When there isn't a vncserver participant and a participant
sends 'INVITE' message as a vncviewer, sipconf sends back "200 OK"
at once and keeps the participant wait until a vncserver participant joins.
- After signaling with a vncserver participant, sipconf does
initial handshaking as a vncviewer with the vncserver. After initial
handshaking, sipconf receives messages from the vncserver and sends
them all the vncviewer participants.
- After signaling with a vncviewer participant, sipconf does
initial handshaking as a vncserver with the vncviewer. After initial
handshaking, sipconf receives messages from the vncviewer and sends
them to the vncserver.
Implementation
I created two threads. One is VNCClientThread and the other is
VNCServerThread.
1. VNCClientThread
This thread communicates with a vncserver participant program and
works as a vncviewer. This thread is created when a vncserver
participant joins a conference. This thread does
- connect to a vncserver
- initial handshaking with the vncserver
- receive messages from the vncserver
- send the messages to all the vncviewers
2. VNCServerThread
This thread communicates with a vncviewer participant program and
works as a vncserver. This thread is created when a vncviewer
participant joins a conference. This thread does
- accept a connection from a vncviewer
- initial handshaking with the vncviewer
- receive messages from the vncviewer
- send the messages to the vncserver
Modified files
I modified the following files. They are in
http://www.cs.columbia.edu/~koguchi/ScreenSharing/src/sipconf/.
tar file is
here.
- libmixer/rtpmapi.c, rtpmapi.h
- add members related to vnc to rtpm_call_leg_t
- add members related to vnc to rtpm_conf_t
- libmixer/sdp.c, sdp.h
- add media_transport_type definition
- libmixer/video.c, data.c
- add media_transport_type setting
- libmixer/module.mk
- libsip++/sipsdp.cpp
- sipconf/main.cpp
- add Transport Type
- add parsing password from k line
I added the following files in libmixer directory.
- libmixer/vnc.c, vnc.h
- include VNCServerThread and VNCClientThread
- libmixer/vncinit.c, vncinit.h
- handle VNC initial handshaking
- libmixer/vncauth.c, vncauth.h
- the same as original VNC program
- libmixer/d3des.c, d3des.h
- the same as original VNC program
- libmixer/rfbproto.h
- the same as original VNC program
Limitations
- When a vncserver participant uses Windows machine and a vncviewer
participant also uses Windows machine, the vncviewer participant can't
see the vncserver's Windows desktop, althogh vncviewer participants
who use Sun or Linux can see the Windows desktop.
- When a vncserver participant hangs up before vncviewers,
the vncviewer's screen doesn't close automatically.
Last updated
by Kazuumi Koguchi