Skip to content

Commit

Permalink
Added definition of the MSRP protcol
Browse files Browse the repository at this point in the history
Missing part of b256c5c
  • Loading branch information
bogdan-iancu committed Mar 1, 2022
1 parent b256c5c commit de80cfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ip_addr.h
Expand Up @@ -57,7 +57,8 @@

enum sip_protos { PROTO_NONE = 0, PROTO_FIRST = 1, PROTO_UDP = 1, \
PROTO_TCP, PROTO_TLS, PROTO_SCTP, PROTO_WS, PROTO_WSS, PROTO_BIN,
PROTO_BINS, PROTO_HEP_UDP, PROTO_HEP_TCP, PROTO_SMPP, PROTO_OTHER };
PROTO_BINS, PROTO_HEP_UDP, PROTO_HEP_TCP, PROTO_SMPP, PROTO_MSRP,
PROTO_MSRPS, PROTO_OTHER };
#define PROTO_LAST PROTO_OTHER

struct ip_addr{
Expand Down
5 changes: 5 additions & 0 deletions socket_info.h
Expand Up @@ -253,6 +253,11 @@ inline static int parse_proto(unsigned char* s, long len, int* proto)
*proto=PROTO_SMPP; return 0;
}
break;
case PROTO2UINT('m', 's', 'r'):
if(len==4 && (s[3]=='p' || s[3]=='P')) {
*proto=PROTO_MSRP; return 0;
}
break;
default:
if(len==2 && (s[0]|0x20)=='w' && (s[1]|0x20)=='s') {
*proto=PROTO_WS; return 0;
Expand Down

0 comments on commit de80cfc

Please sign in to comment.