Add Message Id Function

Signed-off-by: Ken Tseng <vul3yo6@hotmail.com>