The EJP works on the higher layers of the network protocols that are necessary for jacking in to the Matrix. In TCP/IP manner, EJP would take the place between Layer 4 (Application) and Layer 3 (Transport). Layer 4 would in our sense be the Host body. But EJP is not a mandatory protocol in the protocol stack. You remember Neurophyte? I think that was the name. I think I've read that she jacked in from a Hovercraft where the EJP wasn't installed yet. Anyways, that means that the EJP does not interfere with the network protocols of the Machines, which then means, that the Machines have no to little means to interfere with the EJP.
You see, the EJP works like a filter. The additional informations packed between the headers and bodies of the higher layers enables the EJP to analyse any damage done to the RSI in the Matrix.
No damage whatsoever is let through, thus that information is being filtered out, internally processed and then transported to the Host. Naturally that creates a problem of information sharing between RSI and Host. That problem is being dealt with a puffer inside an allocated memory space for each individual Host.
To explain the problem one has to imagine on how the mind looks like when jacked in. When you are jacked in, all that you are is basically shut off from the rest of the brain, leaving behind only vital features, which also includes pain management. The shut-off part of the brain is then transformed into the RSI. Back in the day the vital system was shared between the RSI and the host body, which meant that any damage taken from the RSI was tansferred to the Host and vice versa. The EJP however posseses an allocated memory space between the vital system and the RSI, creating a seperate vital system meant only for the RSI. The EJP reroutes any information concerning the vital status not to the bodies vital system but to that allocated virtual vital system. Any damage taken in the Matrix is still being "felt" but only a virtual vital system is being damaged, the Host is being left unharmed. The connection between the virtual and the actual vital system includes only a static pulse, remembering the Host that it's in fact still alive.
Now, when someone dies in the Matrix, it means that the VVS (Virtual Vital System) has been severly damaged. In case of this happening, the VVS has to be replaced by a new VVS, which is basically a copy of the AVS (Actual Vital System). The process is being called "Reconstruction". Unfortunately, if only the VVS would have to be replaced, then it would be easy, but unfortunately, the Image Data is affected by any damage as well. For that case periodical updates of a healthy RSI are being made and then used in the Reconstruction. However, Reconstruction never uses a full RSI reconstruction, because that would lead to another problem (spoke of later on). Reconstruction always only reconstructs the damaged parts of the RSI. During the phase of reconstruction of the RSI and the reconstruction of the VVS, for a short time the path to the AVS is inevitably being left open. That is because without the VVS which sends a static impulse to the AVS, the Host would die. To prevent that, the path to the AVS has to be opened again for that short period of time. Unfortunately that implies that during that phase pain that has been stored in the puffer (leftovers of the RSI) will be sent along to the AVS now. This is what we call the "Near Death Trauma". The bigger the feedback, the stronger the NDT becomes. Obviously that depends on the damage dealt onto the RSI, which means that if the EJP had to reconstruct the RSI completely, the feedback would be so big, that the shock the AVS takes would kill the Host.
After you die in the Matrix, or in a construct on your Hovercraft, Reconstruction is not an immediate process. Reconstruction can be delayed by about 6 minutes, in which time, the body is braindead. Of course, Operators naturally will reconstruct their Operatives immediately to avoid any permanent damage to the brain. This 6 minute time is meant as a puffer before one really dies. The EJP has no problem with the Reconstruction of a braindead Host, considering it has the RSI and Vital Data.
Reconstruction usually has to be done outside the simulation, for it takes up resources that oneself, being dead, cannot use. However, in co-operation with the Machines during the truce, some hacking routines have been established which allow people with the necessary routines to act as a mediator, which means they are able to initiate the Reconstruction process within the simulation.
((Oh, and yes, that is my explanation of the EJ protocol and the Reconstruction process. I have also written down some explanations of basic hacking routines and hacking abilities, but nothing anywhere near completion >_>

)