I would recommend you alter the source rpm of this file; edit the path in which the files will be installed to, so as to not create conflicts between the files you are about to install, and those provided by
libpcap.so.0.9.4 (no two rpm:s may be installed which provide the same file on same path both).
Or remove from the source rpm those files which will conflict with what you have got installed, it could be:
/usr/lib/libpcap.so.0 and possibly
/usr/share/man/man3/pcap.3.gz. (one is a symlink and the other a man page) from your src rpm:s .spec file, and rpmbuild it.
Then you can install (not upgrade)
/root/rpmbuild/RPMS/i386/libpcap-1.4.0-1.i386.rpm along side with libpcap-0.9.4 so that the versions may peacefully coexist on your system.
If you are using yum, then you may need to edit your
/etc/yum.conf to add
libpcap to your list of
installonlypkgs, so that yum will not replace your older version of libpcap with the one you just created (
man 5 yum.conf). (if you use yum instead of plain rpm, then it can keep track of all the transactions for you with
yum history. It is very powerful). You could also change the name in the
.spec file in the source rpm to something like
libpcap14, that's what I usually do.
Then add the path on where you installed the packages to
$LD_LIBRARY_PATH, in the script/command which fires up your program and it should work. (or
LD_PRELOAD your newer version of libpcap instead).
You could do what slm suggested too, it is by far the quickest way to goal:
rpm2cpio /root/rpmbuild/RPMS/i386/libpcap-1.4.0-1.i386.rpm > libpcap-1.4.0-1.i386.cpio and then in a separate folder you extract the archive and use the files as described above. However, rpm is the way CentOS ships programs and I think it messy and hard to maintain in the long run.
Another cause of action can be for you to re-build all that depends on libpcap v0.9.4 to v1.0.0 and upgrade those. Normally, it would imply problems for future updates, but as you appear to be using CentOS 5, you need not worry since it is EOL.
A final option for you to consider is
yum remove libpcap, see how many packages it wants to remove (
yum won't actually remove anything until you hit the Y button and press enter), since you may be able to remove these packages and use yum, if it turns out you couldn't after all, you can roll back with
yum history undo command (I don't remember in what version of yum this was implemented in yum, so check first if this sub command is available to you). Also, make sure that you got your repositories pointing to the repos which has these files available.