The long metal part is called a rib or under-rib, and is a mounting place for one or two ramrod ferrules, which stow the ramrod. I have seen ribs attached to the barrel with screws or silver solder, and know of one that was attached with Loctite Black Max adhesive. Ferrules are attached to the rib with solder, or screws from the top of the rib.
The under-rib became popular with the advent of shorter, heavier barreled, half-stock rifles. The first one I know of was the 1803 Harpers Ferry Rifle, tho' others here may know of earlier examples. Many gunsmiths built half-stock rifles for the Rocky Mountain fur trade.